summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2009-01-13 01:50:51 +0000
committertruebrain <truebrain@openttd.org>2009-01-13 01:50:51 +0000
commite06e372529db5e52bb1dc0a7d9891974fefa4ae5 (patch)
tree937a6aa84774e90f244304149af1b5a76a03ff22
parentbcbbf2c366b829994983513d2858762874e99964 (diff)
downloadopenttd-e06e372529db5e52bb1dc0a7d9891974fefa4ae5.tar.xz
(svn r15046) -Fix (r15045): in case CanLoadFromRevision does not exist, only allow savedata from the same version as we are now
-rw-r--r--src/ai/ai_info.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/ai_info.cpp b/src/ai/ai_info.cpp
index e55affaa5..0b2539bba 100644
--- a/src/ai/ai_info.cpp
+++ b/src/ai/ai_info.cpp
@@ -73,7 +73,7 @@ const char *AIFileInfo::GetInstanceName()
bool AIFileInfo::CanLoadFromVersion(int version)
{
if (version == -1) return true;
- if (!this->engine->MethodExists(*this->SQ_instance, "CanLoadFromVersion")) return true;
+ if (!this->engine->MethodExists(*this->SQ_instance, "CanLoadFromVersion")) return (version == this->GetVersion());
HSQUIRRELVM vm = this->engine->GetVM();
int top = sq_gettop(vm);