1
0
mirror of https://github.com/luanti-org/luanti.git synced 2026-01-12 04:05:26 +01:00

type check listname

This commit is contained in:
OgelGames
2024-04-25 02:45:12 +10:00
parent 60acec515e
commit 8be77302e9

View File

@@ -272,7 +272,7 @@ int InvRef::l_set_lists(lua_State *L)
lua_pushnil(L);
luaL_checktype(L, 2, LUA_TTABLE);
while (lua_next(L, 2)) {
const char *listname = lua_tostring(L, -2);
const char *listname = luaL_checkstring(L, -2);
read_inventory_list(L, -1, &tempInv, listname, server);
lua_pop(L, 1);
}