From: Wolfgang (Blub) Bumiller Date: Thu, 23 Aug 2012 16:40:10 +0000 (+0200) Subject: Add the empty globaldef/fielddef to the object, savegame skips that null-def when... X-Git-Tag: 0.1-rc1~69 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9f411a533ac5d62176d8162d6bc81f4df726f274;p=xonotic%2Fgmqcc.git Add the empty globaldef/fielddef to the object, savegame skips that null-def when saving variables... --- diff --git a/code.c b/code.c index 7175604..c2a670f 100644 --- 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; }