diff options
author | bloodstalker <thabogre@gmail.com> | 2019-01-21 10:12:58 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2019-01-21 10:12:58 +0000 |
commit | 23af1ad30b3dfb4f935f7c2682a05827083a5a60 (patch) | |
tree | d1f3b8a361d5f48bce5d651c3cfaba5fc3f4ed3a | |
parent | update (diff) | |
download | luatablegen-23af1ad30b3dfb4f935f7c2682a05827083a5a60.tar.gz luatablegen-23af1ad30b3dfb4f935f7c2682a05827083a5a60.zip |
update
-rwxr-xr-x | luatablegen.py | 5 |
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): |