From: Wolfgang Bumiller Date: Sun, 22 Jul 2012 10:20:06 +0000 (+0200) Subject: use type_sizeof in another place where it wasn't X-Git-Tag: 0.1-rc1~401^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9c2c62e82bd05c15f6ac8d0df345c243979f95b8;p=xonotic%2Fgmqcc.git use type_sizeof in another place where it wasn't --- diff --git a/ir.c b/ir.c index 0c0517a..2a5018b 100644 --- a/ir.c +++ b/ir.c @@ -2371,6 +2371,7 @@ static bool gen_global_function(ir_builder *ir, ir_value *global) static bool ir_builder_gen_global(ir_builder *self, ir_value *global) { + size_t i; int32_t *iptr; prog_section_def def; @@ -2450,8 +2451,8 @@ static bool ir_builder_gen_global(ir_builder *self, ir_value *global) case TYPE_VARIANT: /* assume biggest type */ global->code.globaladdr = code_globals_add(0); - code_globals_add(0); - code_globals_add(0); + for (i = 1; i < type_sizeof[TYPE_VARIANT]; ++i) + code_globals_add(0); return true; default: /* refuse to create 'void' type or any other fancy business. */