summaryrefslogtreecommitdiff
path: root/src/town_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-07-18 16:26:51 +0000
committerrubidium <rubidium@openttd.org>2008-07-18 16:26:51 +0000
commit891bec7e23a0a077df93b8fd1fe156ef059df8b4 (patch)
tree71817bf7af4429f1e29b23c2bb0148ca8b0bea3c /src/town_cmd.cpp
parente48d86fad0a384335fa4c49a4f15032bee54b16e (diff)
downloadopenttd-891bec7e23a0a077df93b8fd1fe156ef059df8b4.tar.xz
(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.
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r--src/town_cmd.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 6d49014de..76d872277 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -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)