diff --git a/libs/gamecode/opcodes.py b/libs/gamecode/opcodes.py index 37ca5c2e2..ac5aa5e51 100644 --- a/libs/gamecode/opcodes.py +++ b/libs/gamecode/opcodes.py @@ -114,7 +114,7 @@ call_formats = { "mnemonic": "call", "opname": "call", "format": "{call_fmt[mm]}", - "widths": "{call_widths[mm]}, 0", + "widths": "{call_widths[mm]}, -1", "types": "{call_types[mm]}, ev_void", "args": { "op_mode": ".BCD", diff --git a/tools/qfcc/source/statements.c b/tools/qfcc/source/statements.c index bfba55950..fc5823395 100644 --- a/tools/qfcc/source/statements.c +++ b/tools/qfcc/source/statements.c @@ -1115,7 +1115,14 @@ expr_call (sblock_t *sblock, expr_t *call, operand_t **op) } statement_t *s = new_statement (st_func, "call", call); sblock = statement_subexpr (sblock, func, &s->opa); - s->opc = short_operand (0, call); + if (!op) { + s->opc = short_operand (0, call); + } else { + if (!*op) { + *op = temp_operand (call->e.branch.ret_type, call); + } + s->opc = *op; + } sblock_add_statement (sblock, s); sblock->next = new_sblock (); return sblock->next;