mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-07 01:42:04 +00:00
[qfcc] Update offset for aliased defs
When getting an offset alias of an already aliased def, the offset needs to be updated so it points to the correct part of the def. This is actually a rather old bug but it got uncovered somehow with my rework of the ruamoko semantic processing (probably an altered cast).
This commit is contained in:
parent
4e3bacd827
commit
d08816cb6b
1 changed files with 3 additions and 1 deletions
|
@ -516,8 +516,10 @@ offset_alias_operand (const type_t *type, int offset, operand_t *aop,
|
|||
return top;
|
||||
} else if (aop->op_type == op_def) {
|
||||
def = aop->def;
|
||||
while (def->alias)
|
||||
while (def->alias) {
|
||||
offset += def->offset;
|
||||
def = def->alias;
|
||||
}
|
||||
return def_operand (alias_def (def, type, offset), 0, expr);
|
||||
} else if (aop->op_type == op_value) {
|
||||
if (!is_ptr (aop->value->type)) {
|
||||
|
|
Loading…
Reference in a new issue