summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorZughy <63455151+Zughy@users.noreply.github.com>2020-10-11 13:36:13 +0200
committerGitHub <noreply@github.com>2020-10-11 13:36:13 +0200
commit272b72361acc70dbc047a90a98dbf7d2e9bfd323 (patch)
tree27e15cc89eb337a05d1b0f8da4a37f982cefb8f7 /src/script
parentc61c175e9c648b6e40b85c12940e9b91a52757d7 (diff)
downloadminetest-272b72361acc70dbc047a90a98dbf7d2e9bfd323.tar.gz
minetest-272b72361acc70dbc047a90a98dbf7d2e9bfd323.tar.bz2
minetest-272b72361acc70dbc047a90a98dbf7d2e9bfd323.zip
Add missing type check to InvRef:set_lists() (#10476)
Diffstat (limited to 'src/script')
-rw-r--r--src/script/lua_api/l_inventory.cpp1
1 files changed, 1 insertions, 0 deletions
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);