(svn r15204) -Fix (r15167): The check was a bit too restrictive, the top of the stack needs to be resetted if another function is called while the AI is running but not suspended.

This commit is contained in:
Yexo 2009-01-22 02:01:07 +00:00
parent cb7449b83c
commit 0d52f3b417

View File

@ -194,7 +194,7 @@ bool Squirrel::CallMethod(HSQOBJECT instance, const char *method_name, HSQOBJECT
if (ret != NULL) sq_getstackobj(vm, -1, ret);
/* Reset the top, but don't do so for the AI main function, as we need
* a correct stack when resuming. */
if (this->vm->_suspended == 0) sq_settop(this->vm, top);
if (suspend == -1) sq_settop(this->vm, top);
return this->vm->_suspended != 0;
}