fixed regression in sq_resume
This commit is contained in:
parent
887f121555
commit
b14fc118c0
@ -1137,10 +1137,10 @@ SQRESULT sq_reservestack(HSQUIRRELVM v,SQInteger nsize)
|
||||
|
||||
SQRESULT sq_resume(HSQUIRRELVM v,SQBool retval,SQBool raiseerror)
|
||||
{
|
||||
SQObjectPtr &obj = v->GetUp(-1);
|
||||
if(type(obj)==OT_GENERATOR){
|
||||
if (type(v->GetUp(-1)) == OT_GENERATOR)
|
||||
{
|
||||
v->PushNull(); //retval
|
||||
if(!v->Execute(v->GetUp(-2),0,v->_top,obj,raiseerror,SQVM::ET_RESUME_GENERATOR))
|
||||
if (!v->Execute(v->GetUp(-2), 0, v->_top, v->GetUp(-1), raiseerror, SQVM::ET_RESUME_GENERATOR))
|
||||
{v->Raise_Error(v->_lasterror); return SQ_ERROR;}
|
||||
if(!retval)
|
||||
v->Pop();
|
||||
|
Loading…
x
Reference in New Issue
Block a user