From bf0c4c4f0efa26e9a973dc15164d141a53210c3b Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Mon, 3 Aug 2020 20:42:54 -0300 Subject: [PATCH] Fix #12533: Track designs list does not use natural sorting (#12537) --- distribution/changelog.txt | 1 + src/openrct2/ride/TrackDesignRepository.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 46dd202e0b..0f94db19fa 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -58,6 +58,7 @@ - Fix: [#12498] Circus construction ghost does not rotate (original bug). - Fix: [#12505] Stores selling multiple items can only have the first product advertised. - Fix: [#12506] Cannot advertise food if there are no rides in the park. +- Fix: [#12533] Track designs list does not use natural sorting. - Fix: 'j' character has broken kerning (original bug). - Fix: RCT1 scenarios have more items in the object list than are present in the park or the research list. - Fix: Brakes keep working during "Brakes failure". diff --git a/src/openrct2/ride/TrackDesignRepository.cpp b/src/openrct2/ride/TrackDesignRepository.cpp index a7b9a601c1..a3468adfe9 100644 --- a/src/openrct2/ride/TrackDesignRepository.cpp +++ b/src/openrct2/ride/TrackDesignRepository.cpp @@ -23,6 +23,7 @@ #include "../object/ObjectRepository.h" #include "../object/RideObject.h" #include "../ride/RideData.h" +#include "../util/Util.h" #include "TrackDesign.h" #include @@ -319,7 +320,7 @@ private: { return a.RideType < b.RideType; } - return String::Compare(a.Name, b.Name) < 0; + return strlogicalcmp(a.Name.c_str(), b.Name.c_str()) < 0; }); }