mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-09-02 03:19:10 +00:00
(svn r17402) -Fix (r16425): During every save a few slots on the squirrel stack were leaked
This commit is contained in:
@@ -229,7 +229,7 @@ bool Squirrel::CallMethod(HSQOBJECT instance, const char *method_name, HSQOBJECT
|
|||||||
if (ret != NULL) sq_getstackobj(vm, -1, ret);
|
if (ret != NULL) sq_getstackobj(vm, -1, ret);
|
||||||
/* Reset the top, but don't do so for the AI main function, as we need
|
/* Reset the top, but don't do so for the AI main function, as we need
|
||||||
* a correct stack when resuming. */
|
* 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. */
|
/* Restore the return-value location. */
|
||||||
this->vm->_suspended_target = last_target;
|
this->vm->_suspended_target = last_target;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user