From 34eb5364bbfa6a3093f9ff062a5909349b09ea22 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 21 Mar 2009 11:16:10 +0000 Subject: (svn r15778) -Fix [FS#2749] (r15666): when sorting on cost don't sort on the running cost (sbr) --- src/build_vehicle_gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index b4f617adb..639eade40 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -120,8 +120,8 @@ static int CDECL EngineReliabilitySorter(const void *a, const void *b) static int CDECL EngineCostSorter(const void *a, const void *b) { - int va = GetEngine(*(const EngineID*)a)->GetRunningCost(); - int vb = GetEngine(*(const EngineID*)b)->GetRunningCost(); + Money va = GetEngine(*(const EngineID*)a)->GetCost(); + Money vb = GetEngine(*(const EngineID*)b)->GetCost(); int r = ClampToI32(va - vb); /* Use EngineID to sort instead since we want consistent sorting */ -- cgit v1.2.3-70-g09d2