diff options
author | bloodstalker <thabogre@gmail.com> | 2018-09-20 13:34:04 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2018-09-20 13:34:04 +0000 |
commit | 51ec417dbc9ea2f4b0b1cec4df8f6c339c94d974 (patch) | |
tree | 1b7777ba54dc4b49d1b641220dd08f235d752de6 | |
parent | update (diff) | |
download | luatablegen-51ec417dbc9ea2f4b0b1cec4df8f6c339c94d974.tar.gz luatablegen-51ec417dbc9ea2f4b0b1cec4df8f6c339c94d974.zip |
fix
-rwxr-xr-x | luatablegen.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/luatablegen.py b/luatablegen.py index ee2d4d0..244a8d6 100755 --- a/luatablegen.py +++ b/luatablegen.py @@ -515,6 +515,7 @@ class TbgParser(object): def push_args(self, c_source, struct_name, field_names, lua_types): dummy = str() c_source.write(PUSH_ARGS[0].replace("XXX", struct_name)) + c_source.write("if (_st == NULL) return 0;\n") c_source.write("\tlua_checkstack(__ls, " + repr(len(field_names)) + ");\n") for field_name, lua_type in zip(field_names, lua_types): if lua_type == "integer": dummy = "\tlua_pushinteger(__ls, _st->"+field_name+");\n" |