]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Add the empty globaldef/fielddef to the object, savegame skips that null-def when...
authorWolfgang (Blub) Bumiller <blub@speed.at>
Thu, 23 Aug 2012 16:40:10 +0000 (18:40 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Thu, 23 Aug 2012 16:40:10 +0000 (18:40 +0200)
code.c

diff --git a/code.c b/code.c
index 717560413f8c69427d8dbc0b6b1d12bbb907cbcc..c2a670fbf47bb1406d99ac813dd29ca73e3dc261 100644 (file)
--- a/code.c
+++ b/code.c
@@ -68,6 +68,7 @@ uint32_t                            code_entfields;
 void code_init() {
     prog_section_function  empty_function  = {0,0,0,0,0,0,0,{0}};
     prog_section_statement empty_statement = {0,{0},{0},{0}};
+    prog_section_def       empty_def       = {0, 0, 0};
     int                    i               = 0;
 
     /* omit creation of null code */
@@ -84,6 +85,8 @@ void code_init() {
     code_chars_add     ('\0');
     code_functions_add (empty_function);
     code_statements_add(empty_statement);
+    code_defs_add      (empty_def);
+    code_fields_add    (empty_def);
 
     code_entfields = 0;
 }