summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-01-24 15:01:29 +0000
committersmatz <smatz@openttd.org>2009-01-24 15:01:29 +0000
commit865492592352743a57c594b4890859b06cfe1961 (patch)
treeece39e5272f6e135322be886632f7cabfaa9d31a
parent7120b2455ab044aca379b234b24b9bdcfd642ac2 (diff)
downloadopenttd-865492592352743a57c594b4890859b06cfe1961.tar.xz
(svn r15256) -Fix (r15027): use of uninitialised variable while saving/loading game with AIs
-rw-r--r--src/saveload/company_sl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/saveload/company_sl.cpp b/src/saveload/company_sl.cpp
index ead54be0d..c53b4a5df 100644
--- a/src/saveload/company_sl.cpp
+++ b/src/saveload/company_sl.cpp
@@ -221,7 +221,7 @@ static void SaveLoad_PLYR(Company *c)
SlObject(c, _company_desc);
/* Keep backwards compatible for savegames, so load the old AI block */
- if (!IsHumanCompany(c->index) && !c->is_noai) {
+ if (CheckSavegameVersion(107) && !IsHumanCompany(c->index) && !c->is_noai) {
CompanyOldAI old_ai;
char nothing;