From 272b72361acc70dbc047a90a98dbf7d2e9bfd323 Mon Sep 17 00:00:00 2001 From: Zughy <63455151+Zughy@users.noreply.github.com> Date: Sun, 11 Oct 2020 13:36:13 +0200 Subject: [PATCH] Add missing type check to InvRef:set_lists() (#10476) --- src/script/lua_api/l_inventory.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/script/lua_api/l_inventory.cpp b/src/script/lua_api/l_inventory.cpp index e41b5cb41..434d0a76c 100644 --- a/src/script/lua_api/l_inventory.cpp +++ b/src/script/lua_api/l_inventory.cpp @@ -280,6 +280,7 @@ int InvRef::l_set_lists(lua_State *L) Server *server = getServer(L); lua_pushnil(L); + luaL_checktype(L, 2, LUA_TTABLE); while (lua_next(L, 2)) { const char *listname = lua_tostring(L, -2); read_inventory_list(L, -1, tempInv, listname, server); -- 2.44.0