From 9f951e36a9849a80ece04e16b31163368c0184a5 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Thu, 16 Aug 2012 16:28:59 +0200 Subject: [PATCH] prog_leavefunction needs to take the ++st into account - otherwise INSTR_RETURN ends up skipping the instruction after the calling INSTR_CALL --- exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.39.2