don't bother doing the copy if the value to be returned is already in the

return slot
This commit is contained in:
Bill Currie 2003-08-13 17:07:05 +00:00
parent 34d2e0163c
commit 6f519c7e0f

View file

@ -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) {