mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
the code memory block can move around so take the address of a statement
after statments have been emitted, not before.
This commit is contained in:
parent
ea7576286a
commit
882d0f25ce
1 changed files with 2 additions and 1 deletions
|
@ -177,8 +177,9 @@ emit_branch (expr_t *_e, opcode_t *op, expr_t *e, expr_t *l)
|
|||
|
||||
if (e)
|
||||
def = emit_sub_expr (e, 0);
|
||||
st = &pr.code->code[ofs = pr.code->size];
|
||||
ofs = pr.code->size;
|
||||
emit_statement (_e, op, def, 0, 0);
|
||||
st = &pr.code->code[ofs];
|
||||
if (l->e.label.ofs) {
|
||||
if (op == op_goto)
|
||||
st->a = l->e.label.ofs - ofs;
|
||||
|
|
Loading…
Reference in a new issue