summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2016-02-10 07:40:46 +0000
committerAlexander Lantsev <aunsane@gmail.com>2016-02-10 07:40:46 +0000
commit4932221e81ccb89f1ac2acde300c1e9efb988f8a (patch)
tree809bb25e9c981bbd7f30469f4befaf6b950fef12 /plugins
parent3658aaaea0c9b0a7351f7c17cda767474208efd5 (diff)
MirLua: fixed parsing of nested tables
git-svn-id: http://svn.miranda-ng.org/main/trunk@16259 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/MirLua/Modules/JSON/src/metatable.cpp5
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);