mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-23 20:33:05 +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
5
ir.c
5
ir.c
|
@ -2849,7 +2849,10 @@ static bool gen_global_function(ir_builder *ir, ir_value *global)
|
|||
if (vec_size(irfun->locals)) {
|
||||
ir_value *last = vec_last(irfun->locals);
|
||||
local_var_end = last->code.globaladdr;
|
||||
local_var_end += type_sizeof[last->vtype];
|
||||
if (last->vtype == TYPE_FIELD && last->fieldtype == TYPE_VECTOR)
|
||||
local_var_end += type_sizeof[TYPE_VECTOR];
|
||||
else
|
||||
local_var_end += type_sizeof[last->vtype];
|
||||
}
|
||||
for (i = 0; i < vec_size(irfun->values); ++i)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue