mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-21 10:21:03 +00:00
prog_leavefunction needs to take the ++st into account - otherwise INSTR_RETURN ends up skipping the instruction after the calling INSTR_CALL
This commit is contained in:
parent
54dcbc22bf
commit
9f951e36a9
1 changed files with 1 additions and 1 deletions
2
exec.c
2
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)
|
||||
|
|
Loading…
Reference in a new issue