mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-21 18:30:52 +00:00
Ensure that the members[] array is filled for vector types so the liferange function can use all of them
This commit is contained in:
parent
fcdff3180a
commit
307746dc35
1 changed files with 8 additions and 1 deletions
9
ir.c
9
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];
|
||||
|
|
Loading…
Reference in a new issue