equal
deleted
inserted
replaced
142 _bufcache[0] = '\0'; |
142 _bufcache[0] = '\0'; |
143 |
143 |
144 GetString(_bufcache, GetCustomEngineName(vb)); |
144 GetString(_bufcache, GetCustomEngineName(vb)); |
145 } |
145 } |
146 |
146 |
147 r = strcmp(buf1, _bufcache); // sort by name |
147 r = strcasecmp(buf1, _bufcache); // sort by name |
148 |
148 |
149 if (r == 0) { |
149 if (r == 0) { |
150 /* Use EngineID to sort instead since we want consistent sorting */ |
150 /* Use EngineID to sort instead since we want consistent sorting */ |
151 return TrainEngineNumberSorter(a, b); |
151 return TrainEngineNumberSorter(a, b); |
152 } |
152 } |
153 |
153 |
154 return (_internal_sort_order & 1) ? -r : r; |
154 return _internal_sort_order ? -r : r; |
155 } |
155 } |
156 |
156 |
157 static int CDECL TrainEngineRunningCostSorter(const void *a, const void *b) |
157 static int CDECL TrainEngineRunningCostSorter(const void *a, const void *b) |
158 { |
158 { |
159 const RailVehicleInfo *rvi_a = RailVehInfo(*(const EngineID*)a); |
159 const RailVehicleInfo *rvi_a = RailVehInfo(*(const EngineID*)a); |