summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-01-01 18:54:18 +0000
committerrubidium <rubidium@openttd.org>2007-01-01 18:54:18 +0000
commit2da5a339eb35b4fcb9aa6f93e776a275b1767cef (patch)
tree195369ef345dcf66ac3b4d73929fe4cfaed23e95
parent00156e1094813bdad7d1db179a4325b7d2e2c4c0 (diff)
downloadopenttd-2da5a339eb35b4fcb9aa6f93e776a275b1767cef.tar.xz
(svn r7726) -Fix (r7622, FS#497): segmentation fault on pressing the 'sell all airplanes'.
-rw-r--r--depot_gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/depot_gui.c b/depot_gui.c
index 1f27f6b13..d929696b8 100644
--- a/depot_gui.c
+++ b/depot_gui.c
@@ -779,11 +779,11 @@ static void DepotWndProc(Window *w, WindowEvent *e)
STR_A002_AIRCRAFT_HANGAR
};
TileIndex tile = w->window_number;
- byte vehtype = WP(w, depot_d).type - VEH_Train;
+ byte vehtype = WP(w, depot_d).type;
SetDParam(0, (vehtype == VEH_Aircraft) ? GetStationIndex(tile) : GetDepotByTile(tile)->town_index);
ShowQuery(
- confirm_captions[vehtype],
+ confirm_captions[vehtype - VEH_Train],
STR_DEPOT_SELL_CONFIRMATION_TEXT,
w,
DepotSellAllConfirmationCallback