From 48e1a5a350a969957617d86cdcc2465db63815f5 Mon Sep 17 00:00:00 2001 From: Yexo Date: Thu, 3 Sep 2009 11:32:16 +0000 Subject: (svn r17402) -Fix (r16425): During every save a few slots on the squirrel stack were leaked --- 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 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; -- cgit v1.2.3-54-g00ecf