actually check the right type in lua

This commit is contained in:
ashifolfi 2022-11-20 16:07:14 -05:00
parent 1b14dff0e9
commit 47e981d2a8

View file

@ -2834,7 +2834,7 @@ static int lib_rTextureNumForName(lua_State *L)
static int lib_rCheckTextureNameForNum(lua_State *L) static int lib_rCheckTextureNameForNum(lua_State *L)
{ {
INT32 num = luaL_checkstring(L, 1); INT32 num = (INT32)luaL_checkinteger(L, 1);
//HUDSAFE //HUDSAFE
lua_pushstring(L, R_CheckTextureNameForNum(num)); lua_pushstring(L, R_CheckTextureNameForNum(num));
return 1; return 1;
@ -2842,7 +2842,7 @@ static int lib_rCheckTextureNameForNum(lua_State *L)
static int lib_rTextureNameForNum(lua_State *L) static int lib_rTextureNameForNum(lua_State *L)
{ {
INT32 num = luaL_checkstring(L, 1); INT32 num = (INT32)luaL_checkinteger(L, 1);
//HUDSAFE //HUDSAFE
lua_pushstring(L, R_TextureNameForNum(num)); lua_pushstring(L, R_TextureNameForNum(num));
return 1; return 1;