Mercurial > hg > openttd
changeset 12910:57cb6eb5b9ab draft
(svn r17402) -Fix (r16425): During every save a few slots on the squirrel stack were leaked
author | Yexo <Yexo@openttd.org> |
---|---|
date | Thu, 03 Sep 2009 11:32:16 +0000 |
parents | 082fb426c8cf |
children | 6c10aa6a3232 |
files | src/script/squirrel.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/script/squirrel.cpp +++ b/src/script/squirrel.cpp @@ -229,7 +229,7 @@ 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;