From 0e020927f87ad1c1553780fc1612f5bebc698d9b Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 1 Jan 2007 18:54:18 +0000 Subject: [PATCH] (svn r7726) -Fix (r7622, FS#497): segmentation fault on pressing the 'sell all airplanes'. --- depot_gui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/depot_gui.c b/depot_gui.c index 1f27f6b13e..d929696b82 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