mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
7a825e75ec
Remove the patch for bug 1766220 because the local patch was just a backport from the ICU development branch. And update the local patches for Sorbian and WASI integration to apply cleanly on ICU 72. Differential Revision: https://phabricator.services.mozilla.com/D160179
20 lines
821 B
Diff
20 lines
821 B
Diff
# https://github.com/unicode-org/icu/pull/2248
|
|
# https://github.com/unicode-org/icu/pull/2248.diff
|
|
#
|
|
# ICU bug: https://unicode-org.atlassian.net/browse/ICU-22198
|
|
|
|
diff --git a/intl/icu/source/common/uresbund.cpp b/intl/icu/source/common/uresbund.cpp
|
|
index 17c0177a05c..81fb90e1384 100644
|
|
--- a/intl/icu/source/common/uresbund.cpp
|
|
+++ b/intl/icu/source/common/uresbund.cpp
|
|
@@ -202,7 +202,8 @@ typedef enum UResOpenType UResOpenType;
|
|
*/
|
|
static bool getParentLocaleID(char *name, const char *origName, UResOpenType openType) {
|
|
// early out if the locale ID has a variant code or ends with _
|
|
- if (name[uprv_strlen(name) - 1] == '_' || hasVariant(name)) {
|
|
+ size_t nameLen = uprv_strlen(name);
|
|
+ if (!nameLen || name[nameLen - 1] == '_' || hasVariant(name)) {
|
|
return chopLocale(name);
|
|
}
|
|
|