Fix Lua stack overflow in LUA_UpdateSprName

This commit is contained in:
Hannu Hanhi 2022-01-25 00:43:38 +02:00
parent 3bff9011d8
commit d194bbeacd

View file

@ -590,11 +590,12 @@ void LUA_UpdateSprName(const char *name, lua_Integer value)
if (!lua_isnil(gL, -1))
{
lua_pop(gL, 1);
lua_pushstring(gL, name);
lua_pushinteger(gL, value);
lua_rawset(gL, LUA_GLOBALSINDEX);
}
lua_pop(gL, 1); // pop the rawget result
}
int LUA_EnumLib(lua_State *L)