diff options
author | terkhen <terkhen@openttd.org> | 2010-11-27 22:52:12 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2010-11-27 22:52:12 +0000 |
commit | 75f86a7a21c6c6ea2e5067a5eb9a8690d8584ed1 (patch) | |
tree | 9795c8c24286ea191df003631d9cc6af4c30e2bd /src/cargotype.cpp | |
parent | 4b944cb13e6d75662a9246bf06523a320d814ace (diff) | |
download | openttd-75f86a7a21c6c6ea2e5067a5eb9a8690d8584ed1.tar.xz |
(svn r21344) -Feature [FS#4214]: Natural sorting of strings using ICU.
Diffstat (limited to 'src/cargotype.cpp')
-rw-r--r-- | src/cargotype.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cargotype.cpp b/src/cargotype.cpp index 94edd27f5..66b3840cf 100644 --- a/src/cargotype.cpp +++ b/src/cargotype.cpp @@ -134,7 +134,7 @@ static int CDECL CargoSpecNameSorter(const CargoSpec * const *a, const CargoSpec GetString(a_name, (*a)->name, lastof(a_name)); GetString(b_name, (*b)->name, lastof(b_name)); - int res = strcmp(a_name, b_name); + int res = strnatcmp(a_name, b_name); // Sort by name (natural sorting). /* If the names are equal, sort by cargo bitnum. */ return (res != 0) ? res : ((*a)->bitnum - (*b)->bitnum); |