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
commit4493bd03e328273eaa45f7a69982ea7ebffb6ce5 (patch)
treeece39e5272f6e135322be886632f7cabfaa9d31a
parent47cdbe4a20ef0ab9f2d7108d51b501305ac4d401 (diff)
downloadopenttd-4493bd03e328273eaa45f7a69982ea7ebffb6ce5.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;