From 919391929752a2e8d38228a29c6fe7c8bc9586e1 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Wed, 3 Oct 2018 15:18:45 +0330 Subject: fix --- luatablegen.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/luatablegen.py b/luatablegen.py index 559a8c5..8fe0228 100755 --- a/luatablegen.py +++ b/luatablegen.py @@ -718,7 +718,9 @@ class TbgParser(object): dummy = "lua_checkstack(__ls, 3);\nlua_newtable(__ls);\n" dummy += "for (uint64_t i = 0; i < dummy->" + count_replacer + " ; ++i) {\nlua_pushinteger(__ls, i+1);\n" if ref_node_type != None: - dummy += ref_node_type.attrib["name"]+ "_push_args(__ls, dummy->"+field_name+"[i]);\nnew_" + ref_node_type.attrib["name"] + "(__ls);\n" + dummy += "if (dummy->" +field_name+ "[i] != NULL) {\n" + dummy += ref_node_type.attrib["name"]+ "_push_args(__ls, dummy->"+field_name+"[i]);\n"+"} else {\nlua_pop(__ls, 1);\n break;\n}" + dummy += "new_" + ref_node_type.attrib["name"] + "(__ls);\n" else: eq_lua_type = get_eq_lua_type(field_type) dummy += "lua_push"+eq_lua_type+"(__ls, dummy->"+field_name+"[i]);\n" -- cgit v1.2.3