1
0
Fork 0

(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.

release/0.7
Yexo 2009-01-22 02:01:07 +00:00
parent cb7449b83c
commit 0d52f3b417
1 changed files with 1 additions and 1 deletions

View File

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