From: Wolfgang (Blub) Bumiller Date: Sat, 1 Dec 2012 22:23:00 +0000 (+0100) Subject: Fix a type size bug: non-var locals overlapped with var locals, that was bad X-Git-Tag: 0.1.9~135 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c371efb8826cb270aebd1c3cb4a74b75055ea53d;p=xonotic%2Fgmqcc.git Fix a type size bug: non-var locals overlapped with var locals, that was bad --- diff --git a/ir.c b/ir.c index f1ffc7f..dbb1d97 100644 --- a/ir.c +++ b/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) {