Changeset - r24404:a66f8c4a1a1d
[Not reviewed]
master
0 1 0
Michael Lutz - 3 years ago 2020-12-05 23:29:27
michi@icosahedron.de
Fix 63ccb36ef3: Crash trying to load TTO/TTD savegames. (#8356)
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/saveload/oldloader_sl.cpp
Show inline comments
 
@@ -436,25 +436,25 @@ static bool FixTTOEngines()
 
					e->company_avail = (CompanyMask)0xFF;
 
					e->flags |= ENGINE_AVAILABLE;
 
					break;
 
				}
 
			}
 

	
 
			e->info.climates = 1;
 
		}
 

	
 
		e->preview_company = INVALID_COMPANY;
 
		e->preview_asked = (CompanyMask)-1;
 
		e->preview_wait = 0;
 
		e->name = nullptr;
 
		e->name = std::string{};
 
	}
 

	
 
	return true;
 
}
 

	
 
static void FixTTOCompanies()
 
{
 
	for (Company *c : Company::Iterate()) {
 
		c->cur_economy.company_value = CalculateCompanyValue(c); // company value history is zeroed
 
	}
 
}
 

	
0 comments (0 inline, 0 general)