From 7375d5641871b1ea386938152ad624e79cd5add5 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 4 Jul 2008 19:00:11 +0000 Subject: (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. --- src/oldloader.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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) { -- cgit v1.2.3-70-g09d2