projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38580fb
)
Check for table type when reading groups from Lua
author
darkrose
<lisa@ltmnet.com>
Sun, 15 Jul 2012 06:50:42 +0000
(16:50 +1000)
committer
Perttu Ahola
<celeron55@gmail.com>
Fri, 20 Jul 2012 23:35:45 +0000
(
02:35
+0300)
src/scriptapi.cpp
patch
|
blob
|
history
diff --git
a/src/scriptapi.cpp
b/src/scriptapi.cpp
index 4b3fbe2968822a6360f60c9b4a1191897dc831c2..39e89ddb59c63002a94730f4a26c8c56c3247c21 100644
(file)
--- 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)