mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-22 19:54:06 +01:00
(svn r17417) [0.7] -Backport from trunk:
- Fix: Incomplete check on validity of industry type when building industries (r17413) - Fix: [Squirrel] Guard against Squirrel stack overflows (r17403) - Fix: [NoAI] During every save a few slots on the Squirrel stack were leaked (r17402) - Fix: [NoAI] Several AITile::* functions did not check whether their parameters were valid (r17378)
This commit is contained in:
@@ -222,7 +222,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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user