summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorYexo <yexo@openttd.org>2009-09-03 11:32:16 +0000
committerYexo <yexo@openttd.org>2009-09-03 11:32:16 +0000
commit48e1a5a350a969957617d86cdcc2465db63815f5 (patch)
tree7e77e6dc98387b135019ba736fd26483a17b5cd2 /src/script
parent75aad2a1865f7e29b3a5cfa95a5115b97b114d66 (diff)
downloadopenttd-48e1a5a350a969957617d86cdcc2465db63815f5.tar.xz
(svn r17402) -Fix (r16425): During every save a few slots on the squirrel stack were leaked
Diffstat (limited to 'src/script')
-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 e42d1c833..c9010cfcd 100644
--- a/src/script/squirrel.cpp
+++ b/src/script/squirrel.cpp
@@ -229,7 +229,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->IsSuspended()) sq_settop(this->vm, top);
+ if (suspend == -1) sq_settop(this->vm, top);
/* Restore the return-value location. */
this->vm->_suspended_target = last_target;