1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-31 02:19:09 +00:00

Fix c8299304: retain support ICU < 65

This commit is contained in:
Rubidium
2023-04-29 23:51:39 +02:00
committed by rubidium42
parent 73bdd4bdd7
commit ee9239d293

View File

@@ -790,7 +790,7 @@ int StrNaturalCompare(std::string_view s1, std::string_view s2, bool ignore_garb
#ifdef WITH_ICU_I18N
if (_current_collator) {
UErrorCode status = U_ZERO_ERROR;
int result = _current_collator->compareUTF8(s1, s2, status);
int result = _current_collator->compareUTF8(icu::StringPiece(s1.data(), s1.size()), icu::StringPiece(s2.data(), s2.size()), status);
if (U_SUCCESS(status)) return result;
}
#endif /* WITH_ICU_I18N */