mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 09:51:41 +00:00
Use pr_return for the null pointer check.
The params come after the return slot :P. Getting a null pointer exception for movep from .return wasn't very funny.
This commit is contained in:
parent
386a729209
commit
3b63c31b5d
1 changed files with 1 additions and 1 deletions
|
@ -257,7 +257,7 @@ PR_LeaveFunction (progs_t *pr)
|
|||
VISIBLE void
|
||||
PR_BoundsCheckSize (progs_t *pr, pointer_t addr, unsigned size)
|
||||
{
|
||||
if (addr < pr->pr_real_params[0] - pr->pr_globals)
|
||||
if (addr < pr->pr_return - pr->pr_globals)
|
||||
PR_RunError (pr, "null pointer access");
|
||||
if (addr >= pr->globals_size
|
||||
|| size > (unsigned) (pr->globals_size - addr))
|
||||
|
|
Loading…
Reference in a new issue