Fixes Black's latest bug. Ensure saved return values are in a locked temp, and not corrupted by the following function call.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2874 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2008-01-23 15:54:36 +00:00
parent 433ade6f5c
commit d591079731

View file

@ -2555,12 +2555,6 @@ QCC_def_t *QCC_PR_ParseFunctionCall (QCC_def_t *func) //warning, the func could
}
}
QCC_FreeTemp(func);
QCC_LockActiveTemps(); //any temps before are likly to be used with the return value.
QCC_UnFreeTemp(func);
//any temps referenced to build the parameters don't need to be locked.
// copy the arguments to the global parameter variables
arg = 0;
if (t->type == ev_variant)
@ -2590,6 +2584,14 @@ QCC_def_t *QCC_PR_ParseFunctionCall (QCC_def_t *func) //warning, the func could
else
old = NULL;
//we dont need to lock the local containing the function index because its thrown away after the call anyway
//(if a function is called in the argument list then it'll be locked as part of that call)
QCC_FreeTemp(func);
QCC_LockActiveTemps(); //any temps before are likly to be used with the return value.
QCC_UnFreeTemp(func);
//any temps referenced to build the parameters don't need to be locked.
if (opt_vectorcalls && (t->num_parms == 1 && t->param->type == ev_vector))
{ //if we're using vectorcalls
//if it's a function, takes a vector