1
0
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:
rubidium
2009-09-04 20:40:15 +00:00
parent 0a4299bdfd
commit a442343076
5 changed files with 33 additions and 5 deletions

View File

@@ -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;