Add the empty globaldef/fielddef to the object, savegame skips that null-def when saving variables...

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-08-23 18:40:10 +02:00
parent 76b0eb0cb7
commit 9f411a533a

3
code.c
View file

@ -68,6 +68,7 @@ uint32_t code_entfields;
void code_init() { void code_init() {
prog_section_function empty_function = {0,0,0,0,0,0,0,{0}}; prog_section_function empty_function = {0,0,0,0,0,0,0,{0}};
prog_section_statement empty_statement = {0,{0},{0},{0}}; prog_section_statement empty_statement = {0,{0},{0},{0}};
prog_section_def empty_def = {0, 0, 0};
int i = 0; int i = 0;
/* omit creation of null code */ /* omit creation of null code */
@ -84,6 +85,8 @@ void code_init() {
code_chars_add ('\0'); code_chars_add ('\0');
code_functions_add (empty_function); code_functions_add (empty_function);
code_statements_add(empty_statement); code_statements_add(empty_statement);
code_defs_add (empty_def);
code_fields_add (empty_def);
code_entfields = 0; code_entfields = 0;
} }