summaryrefslogtreecommitdiff
path: root/src/script/squirrel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/squirrel.cpp')
-rw-r--r--src/script/squirrel.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}