From: Wolfgang (Blub) Bumiller Date: Thu, 16 Aug 2012 14:28:59 +0000 (+0200) Subject: prog_leavefunction needs to take the ++st into account - otherwise INSTR_RETURN ends... X-Git-Tag: 0.1-rc1~244 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9f951e36a9849a80ece04e16b31163368c0184a5;p=xonotic%2Fgmqcc.git prog_leavefunction needs to take the ++st into account - otherwise INSTR_RETURN ends up skipping the instruction after the calling INSTR_CALL --- diff --git a/exec.c b/exec.c index 348d2af..66095f5 100644 --- a/exec.c +++ b/exec.c @@ -512,7 +512,7 @@ static qcint prog_leavefunction(qc_program *prog) exit(1); } - return st.stmt; + return st.stmt - 1; /* offset the ++st */ } bool prog_exec(qc_program *prog, prog_section_function *func, size_t flags, long maxjumps)