summaryrefslogtreecommitdiff
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
commitb4fb14693a7412ac8f0904f0ffad508a12e87375 (patch)
tree3e93522b02cb551445df382eb8f3324b482a8579
parent96443c683a3e3f4dc4dad1b69f00166bffddcb8d (diff)
downloadopenttd-b4fb14693a7412ac8f0904f0ffad508a12e87375.tar.xz
(svn r15742) -Fix (r15736): AIs with an invalid info.nut weren't ignored anymore.
-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;