summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-07-04 19:00:11 +0000
committerrubidium <rubidium@openttd.org>2008-07-04 19:00:11 +0000
commit0cc206e662473644aadf96c71b063e22767e60e6 (patch)
treeacc887c34078d31e7635fad24a33c63783a519c1 /src
parentb5f7633883d3fa95ad2a2e5abaa828a53b1892a9 (diff)
downloadopenttd-0cc206e662473644aadf96c71b063e22767e60e6.tar.xz
(svn r13676) -Fix [FS#2126]: inactive companies from old (TTD) saves could be marked active in some cases, which then loads garbage in their statistics and such.
Diffstat (limited to 'src')
-rw-r--r--src/oldloader.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/oldloader.cpp b/src/oldloader.cpp
index 48be7dfac..124efe4f3 100644
--- a/src/oldloader.cpp
+++ b/src/oldloader.cpp
@@ -1007,9 +1007,13 @@ static bool LoadOldPlayer(LoadgameState *ls, int num)
if (!LoadChunk(ls, p, player_chunk)) return false;
+ if (_old_string_id == 0) {
+ p->is_active = false;
+ return true;
+ }
+
p->name_1 = RemapOldStringID(_old_string_id);
p->president_name_1 = RemapOldStringID(_old_string_id_2);
- p->player_money = p->player_money;
_players_ai[_current_player_id].tick = ai_tick;
if (num == 0) {