mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-25 20:51:38 +00:00
Fix a type size bug: non-var locals overlapped with var locals, that was bad
This commit is contained in:
parent
836935fba2
commit
c371efb882
1 changed files with 4 additions and 1 deletions
3
ir.c
3
ir.c
|
@ -2849,6 +2849,9 @@ static bool gen_global_function(ir_builder *ir, ir_value *global)
|
||||||
if (vec_size(irfun->locals)) {
|
if (vec_size(irfun->locals)) {
|
||||||
ir_value *last = vec_last(irfun->locals);
|
ir_value *last = vec_last(irfun->locals);
|
||||||
local_var_end = last->code.globaladdr;
|
local_var_end = last->code.globaladdr;
|
||||||
|
if (last->vtype == TYPE_FIELD && last->fieldtype == TYPE_VECTOR)
|
||||||
|
local_var_end += type_sizeof[TYPE_VECTOR];
|
||||||
|
else
|
||||||
local_var_end += type_sizeof[last->vtype];
|
local_var_end += type_sizeof[last->vtype];
|
||||||
}
|
}
|
||||||
for (i = 0; i < vec_size(irfun->values); ++i)
|
for (i = 0; i < vec_size(irfun->values); ++i)
|
||||||
|
|
Loading…
Reference in a new issue