summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan G Rennison <j.g.rennison@gmail.com>2019-05-18 18:31:00 +0100
committerglx22 <glx22@users.noreply.github.com>2019-05-18 19:31:00 +0200
commitb9eb9a4af9ded220a31d38b7d705e1c039e007e6 (patch)
treed665b866fab8735bc4067062508ebfe1d7d2c0ba
parent24493548dabdca6c20803d0cde5820b591e9c26e (diff)
downloadopenttd-b9eb9a4af9ded220a31d38b7d705e1c039e007e6.tar.xz
Fix #7594: Max speed rendered incorrectly in road vehicle purchase window when using original acceleration model (#7597)
An incorrect DParam index was used.
-rw-r--r--src/build_vehicle_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index ba3eaf4d0..2778ccd55 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -685,7 +685,7 @@ static int DrawRoadVehPurchaseInfo(int left, int right, int y, EngineID engine_n
DrawString(left, right, y, STR_PURCHASE_INFO_COST_REFIT_SPEED);
} else {
SetDParam(0, e->GetCost());
- SetDParam(2, e->GetDisplayMaxSpeed());
+ SetDParam(1, e->GetDisplayMaxSpeed());
DrawString(left, right, y, STR_PURCHASE_INFO_COST_SPEED);
}
y += FONT_HEIGHT_NORMAL;