mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 13:10:34 +00:00
Fix the jump instruction.
The offset to compensate for st++ was missing. Obviously, the code has never been tested. Found while looking at the jump code and thinking about using 32-bit addresses for the jump tables.
This commit is contained in:
parent
fd1ea9e00e
commit
99a8e8f228
1 changed files with 1 additions and 1 deletions
|
@ -893,7 +893,7 @@ PR_ExecuteProgram (progs_t * pr, func_t fnum)
|
||||||
&& (OPA.uinteger_var >= pr->progs->numstatements)) {
|
&& (OPA.uinteger_var >= pr->progs->numstatements)) {
|
||||||
PR_RunError (pr, "Invalid jump destination");
|
PR_RunError (pr, "Invalid jump destination");
|
||||||
}
|
}
|
||||||
pr->pr_xstatement = OPA.uinteger_var;
|
pr->pr_xstatement = OPA.uinteger_var - 1; // offset the st++
|
||||||
st = pr->pr_statements + pr->pr_xstatement;
|
st = pr->pr_statements + pr->pr_xstatement;
|
||||||
break;
|
break;
|
||||||
case OP_JUMPB:
|
case OP_JUMPB:
|
||||||
|
|
Loading…
Reference in a new issue