From: Wolfgang Bumiller Date: Mon, 24 Dec 2012 11:52:15 +0000 (+0100) Subject: Ensure that the members[] array is filled for vector types so the liferange function... X-Git-Tag: before-library~501 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=307746dc35b5757afc2108f44c5e9c3000e2a9e7;p=xonotic%2Fgmqcc.git Ensure that the members[] array is filled for vector types so the liferange function can use all of them --- diff --git a/ir.c b/ir.c index d578370..17bf16b 100644 --- a/ir.c +++ b/ir.c @@ -3240,8 +3240,12 @@ static bool ir_builder_gen_global(ir_builder *self, ir_value *global, bool isloc case TYPE_FIELD: if (pushdef) { vec_push(code_defs, def); - if (global->fieldtype == TYPE_VECTOR) + if (global->fieldtype == TYPE_VECTOR) { gen_vector_defs(def, global->name); + ir_value_vector_member(global, 0); + ir_value_vector_member(global, 1); + ir_value_vector_member(global, 2); + } } return gen_global_field(global); case TYPE_ENTITY: @@ -3277,6 +3281,9 @@ static bool ir_builder_gen_global(ir_builder *self, ir_value *global, bool isloc case TYPE_VECTOR: { size_t d; + ir_value_vector_member(global, 0); + ir_value_vector_member(global, 1); + ir_value_vector_member(global, 2); ir_value_code_setaddr(global, vec_size(code_globals)); if (global->hasvalue) { iptr = (int32_t*)&global->constval.ivec[0];