From: Wolfgang (Blub) Bumiller Date: Wed, 22 Aug 2012 12:15:49 +0000 (+0200) Subject: First generate the globals, then the fields, so the defs have the correct layout... X-Git-Tag: 0.1-rc1~103 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f6e5396f9f160d93f4eb92ff9f206e64b6b0c001;p=xonotic%2Fgmqcc.git First generate the globals, then the fields, so the defs have the correct layout for quake --- diff --git a/ir.c b/ir.c index df2e32f..74cb1cb 100644 --- a/ir.c +++ b/ir.c @@ -2817,16 +2817,16 @@ bool ir_builder_generate(ir_builder *self, const char *filename) code_init(); - for (i = 0; i < self->fields_count; ++i) + for (i = 0; i < self->globals_count; ++i) { - if (!ir_builder_gen_field(self, self->fields[i])) { + if (!ir_builder_gen_global(self, self->globals[i])) { return false; } } - for (i = 0; i < self->globals_count; ++i) + for (i = 0; i < self->fields_count; ++i) { - if (!ir_builder_gen_global(self, self->globals[i])) { + if (!ir_builder_gen_field(self, self->fields[i])) { return false; } }