(svn r13730) -Fix: make a copy of the names for news messages about the deletion of companies as the removal of a company could lead to wrong names in the news messages.
This commit is contained in:
@@ -2148,11 +2148,15 @@ static void TownActionRoadRebuild(Town *t)
|
||||
{
|
||||
t->road_build_months = 6;
|
||||
|
||||
char *company_name = MallocT<char>(64);
|
||||
SetDParam(0, _current_player);
|
||||
GetString(company_name, STR_COMPANY_NAME, company_name + 64);
|
||||
|
||||
SetDParam(0, t->index);
|
||||
SetDParam(1, _current_player);
|
||||
SetDParamStr(1, company_name);
|
||||
|
||||
AddNewsItem(STR_2055_TRAFFIC_CHAOS_IN_ROAD_REBUILDING,
|
||||
NS_GENERAL, t->xy, 0);
|
||||
NS_GENERAL, t->xy, 0, company_name);
|
||||
}
|
||||
|
||||
static bool DoBuildStatueOfCompany(TileIndex tile, TownID town_id)
|
||||
|
Reference in New Issue
Block a user