From eed7625a45dc22627917643e20ed24cebe222730 Mon Sep 17 00:00:00 2001 From: NepDisk Date: Wed, 11 Feb 2026 19:39:42 -0500 Subject: [PATCH] Use alloca instead of a c++ vla for W_HashLumpName --- src/CMakeLists.txt | 1 - src/w_wad.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 38c33afed..729c3a4d2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -534,7 +534,6 @@ target_compile_options(SRB2SDL2 PRIVATE -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-private-field - -Wno-vla-extension > # GNU diff --git a/src/w_wad.cpp b/src/w_wad.cpp index d589e0622..f07b02bd1 100644 --- a/src/w_wad.cpp +++ b/src/w_wad.cpp @@ -462,7 +462,7 @@ FUNCINLINE static ATTRINLINE void W_InvalidateLumpnumCache(void) FUNCINLINE static ATTRINLINE UINT32 W_HashLumpName(const char *name, size_t len) { - char uname[len + 1]; + char *uname = (char *)alloca(len + 1); strlcpy(uname, name, len + 1); strupr(uname); return HASH32(uname, len);