summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-03-16 14:40:32 +0000
committeryexo <yexo@openttd.org>2009-03-16 14:40:32 +0000
commitb078f8095a195c07207f10c90da679421baa27ee (patch)
tree3e93522b02cb551445df382eb8f3324b482a8579 /src
parentcabf57b2213ae58897dc52121e564c8725c47671 (diff)
downloadopenttd-b078f8095a195c07207f10c90da679421baa27ee.tar.xz
(svn r15742) -Fix (r15736): AIs with an invalid info.nut weren't ignored anymore.
Diffstat (limited to 'src')
-rw-r--r--src/ai/ai_info.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ai/ai_info.cpp b/src/ai/ai_info.cpp
index cb5d9b645..aa783c385 100644
--- a/src/ai/ai_info.cpp
+++ b/src/ai/ai_info.cpp
@@ -35,7 +35,8 @@ AILibrary::~AILibrary()
/* static */ SQInteger AIFileInfo::Constructor(HSQUIRRELVM vm, AIFileInfo *info)
{
- ScriptFileInfo::Constructor(vm, info);
+ SQInteger res = ScriptFileInfo::Constructor(vm, info);
+ if (res != 0) return res;
info->base = ((AIScanner *)Squirrel::GetGlobalPointer(vm));
return 0;