diff options
Diffstat (limited to 'plugins/MirLua/Modules')
-rw-r--r-- | plugins/MirLua/Modules/JSON/src/metatable.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/MirLua/Modules/JSON/src/metatable.cpp b/plugins/MirLua/Modules/JSON/src/metatable.cpp index 2854a5c888..7d66533aff 100644 --- a/plugins/MirLua/Modules/JSON/src/metatable.cpp +++ b/plugins/MirLua/Modules/JSON/src/metatable.cpp @@ -2,6 +2,7 @@ void table2json(lua_State *L, int idx, JSONNode &node)
{
+ idx = lua_absindex(L, idx);
lua_pushnil(L);
while (lua_next(L, idx) != 0)
{
@@ -22,8 +23,8 @@ void table2json(lua_State *L, int idx, JSONNode &node) case LUA_TNIL:
nnode.nullify();
break;
- //case LUA_TTABLE:
- // table2json(L, -1, nnode);
+ case LUA_TTABLE:
+ table2json(L, -1, nnode);
}
node << nnode;
lua_pop(L, 1);
|