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;