mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-19 15:30:50 +00:00
[qfcc] Fix assigning to entity fields
At least for basic types. Compound types need testing.
This commit is contained in:
parent
f9face0cef
commit
8e6baf1bde
1 changed files with 9 additions and 0 deletions
|
@ -883,6 +883,15 @@ dereference_dst:
|
|||
return sblock;
|
||||
}
|
||||
|
||||
if (is_entity (dst->type) && ofs && is_field (ofs->type)) {
|
||||
s = new_statement (st_expr, "&", dst_expr);
|
||||
s->opa = dst;
|
||||
s->opb = ofs;
|
||||
s->opc = temp_operand (&type_pointer, dst_expr);
|
||||
sblock_add_statement (sblock, s);
|
||||
dst = s->opc;
|
||||
ofs = 0;
|
||||
}
|
||||
s = new_statement (type, opcode, e);
|
||||
s->opa = src;
|
||||
s->opb = dst;
|
||||
|
|
Loading…
Reference in a new issue