train_gui.c
changeset 4836 aee98c87c756
parent 4835 c885511caff1
child 4868 846811004d30
--- a/train_gui.c	Thu Oct 12 15:38:37 2006 +0000
+++ b/train_gui.c	Thu Oct 12 15:39:33 2006 +0000
@@ -144,14 +144,14 @@
 		GetString(_bufcache, GetCustomEngineName(vb));
 	}
 
-	r =  strcmp(buf1, _bufcache); // sort by name
+	r =  strcasecmp(buf1, _bufcache); // sort by name
 
 	if (r == 0) {
 		/* Use EngineID to sort instead since we want consistent sorting */
 		return TrainEngineNumberSorter(a, b);
 	}
 
-	return (_internal_sort_order & 1) ? -r : r;
+	return _internal_sort_order ? -r : r;
 }
 
 static int CDECL TrainEngineRunningCostSorter(const void *a, const void *b)