mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
don't bother doing the copy if the value to be returned is already in the
return slot
This commit is contained in:
parent
34d2e0163c
commit
6f519c7e0f
1 changed files with 3 additions and 1 deletions
|
@ -690,7 +690,9 @@ PR_ExecuteProgram (progs_t * pr, func_t fnum)
|
|||
break;
|
||||
case OP_DONE:
|
||||
case OP_RETURN:
|
||||
memcpy (&R_INT (pr), &OPA, pr->pr_param_size * sizeof (OPA));
|
||||
if (&R_INT (pr) != &OPA.integer_var)
|
||||
memcpy (&R_INT (pr), &OPA,
|
||||
pr->pr_param_size * sizeof (OPA));
|
||||
PR_LeaveFunction (pr);
|
||||
st = pr->pr_statements + pr->pr_xstatement;
|
||||
if (pr->pr_depth == exitdepth) {
|
||||
|
|
Loading…
Reference in a new issue