From 0d52f3b417bb5aec6fda5b588ad6d96c1c7ce40f Mon Sep 17 00:00:00 2001 From: Yexo Date: Thu, 22 Jan 2009 02:01:07 +0000 Subject: (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. --- src/script/squirrel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/script/squirrel.cpp') diff --git a/src/script/squirrel.cpp b/src/script/squirrel.cpp index 22e39562e..aa3344ea2 100644 --- a/src/script/squirrel.cpp +++ b/src/script/squirrel.cpp @@ -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; } -- cgit v1.2.3-54-g00ecf