From 47e981d2a876940f581332afd379caca6568f87e Mon Sep 17 00:00:00 2001 From: ashifolfi Date: Sun, 20 Nov 2022 16:07:14 -0500 Subject: [PATCH] actually check the right type in lua --- src/lua_baselib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lua_baselib.c b/src/lua_baselib.c index 9cfde9706..efbc80472 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -2834,7 +2834,7 @@ static int lib_rTextureNumForName(lua_State *L) static int lib_rCheckTextureNameForNum(lua_State *L) { - INT32 num = luaL_checkstring(L, 1); + INT32 num = (INT32)luaL_checkinteger(L, 1); //HUDSAFE lua_pushstring(L, R_CheckTextureNameForNum(num)); return 1; @@ -2842,7 +2842,7 @@ static int lib_rCheckTextureNameForNum(lua_State *L) static int lib_rTextureNameForNum(lua_State *L) { - INT32 num = luaL_checkstring(L, 1); + INT32 num = (INT32)luaL_checkinteger(L, 1); //HUDSAFE lua_pushstring(L, R_TextureNameForNum(num)); return 1;