diff options
author | darkrose <lisa@ltmnet.com> | 2012-07-15 16:50:42 +1000 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-07-21 02:35:45 +0300 |
commit | 369046bbb45a05625919d07691986b06f7564d31 (patch) | |
tree | 0da6b96d093b7c7d7fe3a4e170c97c278248b91a /src | |
parent | 38580fbee71d9833ae05eae604ce2301cd23218f (diff) | |
download | minetest-369046bbb45a05625919d07691986b06f7564d31.tar.gz minetest-369046bbb45a05625919d07691986b06f7564d31.tar.bz2 minetest-369046bbb45a05625919d07691986b06f7564d31.zip |
Check for table type when reading groups from Lua
Diffstat (limited to 'src')
-rw-r--r-- | src/scriptapi.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp index 4b3fbe296..39e89ddb5 100644 --- a/src/scriptapi.cpp +++ b/src/scriptapi.cpp @@ -686,6 +686,8 @@ static NodeBox read_nodebox(lua_State *L, int index) static void read_groups(lua_State *L, int index, std::map<std::string, int> &result) { + if (!lua_istable(L,index)) + return; result.clear(); lua_pushnil(L); if(index < 0) |