From b4bd8f428d3cb484be6e50b59dc1279308e29a40 Mon Sep 17 00:00:00 2001 From: toaster Date: Fri, 21 Jul 2023 16:20:25 +0100 Subject: [PATCH] Permit lowercase enum grabs for sounds in get_number outside of Lua A different solution to the issue reported on the SRB2 port of this branch. We don't care quite as much about exact game behaviour, so this permits lowercase sound effects (same as the source code) in maps' stringargs. --- src/deh_lua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/deh_lua.c b/src/deh_lua.c index 6309859bd..7b9555104 100644 --- a/src/deh_lua.c +++ b/src/deh_lua.c @@ -493,7 +493,7 @@ static inline int lib_getenum(lua_State *L) if (mathlib) return luaL_error(L, "player sprite '%s' could not be found.\n", word); return 0; } - else if (!mathlib && fastncmp("sfx_",word,4)) { + else if (fastncmp("sfx_",word,4)) { p = word+4; for (i = 0; i < NUMSFX; i++) if (S_sfx[i].name && fastcmp(p, S_sfx[i].name)) {