diff options
author | rubidium <rubidium@openttd.org> | 2007-09-17 04:23:03 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-09-17 04:23:03 +0000 |
commit | f41c8ab3aa532845b480589be09fb630c957a40e (patch) | |
tree | 7b1861fb2f716b857d3f3e5cc617f04cc8d36524 /src/build_vehicle_gui.cpp | |
parent | 4e130204aef7ee8d6b13f4928589dc5e408edaf8 (diff) | |
download | openttd-f41c8ab3aa532845b480589be09fb630c957a40e.tar.xz |
(svn r11122) -Fix [FS#1234]: crash when building a NewGRF vehicle when the articulated build vehicle callback returneed a different value for the purchase window than the normal build. Thanks for Dalestan and _minime_ for pointers to possible causes.
Diffstat (limited to 'src/build_vehicle_gui.cpp')
-rw-r--r-- | src/build_vehicle_gui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index 5728212ab..4cbc267be 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -621,7 +621,7 @@ int DrawVehiclePurchaseInfo(int x, int y, uint w, EngineID engine_number) int multihead = (rvi->railveh_type == RAILVEH_MULTIHEAD ? 1 : 0); SetDParam(0, rvi->cargo_type); - SetDParam(1, (capacity * (CountArticulatedParts(engine_number) + 1)) << multihead); + SetDParam(1, (capacity * (CountArticulatedParts(engine_number, true) + 1)) << multihead); SetDParam(2, refitable ? STR_9842_REFITTABLE : STR_EMPTY); } DrawString(x, y, STR_PURCHASE_INFO_CAPACITY, 0); |