From 23af1ad30b3dfb4f935f7c2682a05827083a5a60 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Mon, 21 Jan 2019 13:42:58 +0330 Subject: update --- luatablegen.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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): -- cgit v1.2.3