mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
handle "return 0" a bit better. assumes location is is always 0, but it
always has been (and always /should/ be anyway:)
This commit is contained in:
parent
28e2679f0b
commit
fe3b544528
1 changed files with 4 additions and 1 deletions
|
@ -690,7 +690,10 @@ PR_ExecuteProgram (progs_t * pr, func_t fnum)
|
|||
break;
|
||||
case OP_DONE:
|
||||
case OP_RETURN:
|
||||
if (&R_INT (pr) != &OPA.integer_var)
|
||||
if (!st->a)
|
||||
memset (&R_INT (pr), 0,
|
||||
pr->pr_param_size * sizeof (OPA));
|
||||
else if (&R_INT (pr) != &OPA.integer_var)
|
||||
memcpy (&R_INT (pr), &OPA,
|
||||
pr->pr_param_size * sizeof (OPA));
|
||||
PR_LeaveFunction (pr);
|
||||
|
|
Loading…
Reference in a new issue