aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2019-01-21 10:12:58 +0000
committerbloodstalker <thabogre@gmail.com>2019-01-21 10:12:58 +0000
commit23af1ad30b3dfb4f935f7c2682a05827083a5a60 (patch)
treed1f3b8a361d5f48bce5d651c3cfaba5fc3f4ed3a
parentupdate (diff)
downloadluatablegen-23af1ad30b3dfb4f935f7c2682a05827083a5a60.tar.gz
luatablegen-23af1ad30b3dfb4f935f7c2682a05827083a5a60.zip
update
Diffstat (limited to '')
-rwxr-xr-xluatablegen.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/luatablegen.py b/luatablegen.py
index 9f90820..c25b243 100755
--- a/luatablegen.py
+++ b/luatablegen.py
@@ -662,7 +662,10 @@ class TbgParser(object):
sys.exit(1)
c_source.write(dummy)
dummy = str()
- c_source.write(PUSH_ARGS[2].replace("NNN", repr(len(field_names))))
+ if not field_names:
+ c_source.write(PUSH_ARGS[2].replace("NNN", "1"))
+ else:
+ c_source.write(PUSH_ARGS[2].replace("NNN", repr(len(field_names))))
c_source.write("\n")
def new(self, c_source, struct_name, field_types, field_names, lua_types):