Skip to content

Commit

Permalink
Add missing type check to InvRef:set_lists() (#10476)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zughy committed Oct 11, 2020
1 parent c61c175 commit 272b723
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/script/lua_api/l_inventory.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 272b723

Please sign in to comment.