From f149d058a16b929f722b3b19ea1bb7b2053296f6 Mon Sep 17 00:00:00 2001 From: Indev Date: Mon, 21 Oct 2024 18:06:35 +0300 Subject: [PATCH] Fix off-by-one error in lib_setSfxInfo --- src/lua_infolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lua_infolib.c b/src/lua_infolib.c index 8754176ed..46b451ccc 100644 --- a/src/lua_infolib.c +++ b/src/lua_infolib.c @@ -940,7 +940,7 @@ static int lib_setSfxInfo(lua_State *L) if (lua_isnumber(L, 2)) { - int j = lua_tointeger(L, 2) - 1; + int j = lua_tointeger(L, 2); // Read and Write enums were combined, need to do this switch now switch (j)