Skip to content

Commit 272b723

Browse files
authoredOct 11, 2020
Add missing type check to InvRef:set_lists() (#10476)
1 parent c61c175 commit 272b723

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

Diff for: ‎src/script/lua_api/l_inventory.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ int InvRef::l_set_lists(lua_State *L)
280280
Server *server = getServer(L);
281281

282282
lua_pushnil(L);
283+
luaL_checktype(L, 2, LUA_TTABLE);
283284
while (lua_next(L, 2)) {
284285
const char *listname = lua_tostring(L, -2);
285286
read_inventory_list(L, -1, tempInv, listname, server);

0 commit comments

Comments
 (0)