diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2024-10-24 22:09:23 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2024-10-24 22:47:59 +0300 |
commit | e698870caa3dff7234f0a4433b1751834b9e7811 (patch) | |
tree | 6f0d0ca10498223b051f5e04f9a1087147cf3c87 /thirdparty/icu4c/common/locdispnames.cpp | |
parent | 1015a481ff43edb1126ab39a147fefda290131e5 (diff) | |
download | redot-engine-e698870caa3dff7234f0a4433b1751834b9e7811.tar.gz |
Update ICU to 76.1
Diffstat (limited to 'thirdparty/icu4c/common/locdispnames.cpp')
-rw-r--r-- | thirdparty/icu4c/common/locdispnames.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/thirdparty/icu4c/common/locdispnames.cpp b/thirdparty/icu4c/common/locdispnames.cpp index 0be069357a..ddf7687a2b 100644 --- a/thirdparty/icu4c/common/locdispnames.cpp +++ b/thirdparty/icu4c/common/locdispnames.cpp @@ -245,7 +245,7 @@ Locale::getDisplayName(const Locale &displayLocale, return result; } -#if ! UCONFIG_NO_BREAK_ITERATION +#if !UCONFIG_NO_BREAK_ITERATION // ------------------------------------- // Gets the objectLocale display name in the default locale language. @@ -351,7 +351,7 @@ _getStringOrCopyKey(const char *path, const char *locale, } } else { /* no string from a resource bundle: convert the substitute */ - length=(int32_t)uprv_strlen(substitute); + length = static_cast<int32_t>(uprv_strlen(substitute)); u_charsToUChars(substitute, dest, uprv_min(length, destCapacity)); errorCode = U_USING_DEFAULT_WARNING; } @@ -835,7 +835,10 @@ uloc_getDisplayKeywordValue( const char* locale, } /* get the keyword value */ - CharString keywordValue = ulocimp_getKeywordValue(locale, keyword, *status); + CharString keywordValue; + if (keyword != nullptr && *keyword != '\0') { + keywordValue = ulocimp_getKeywordValue(locale, keyword, *status); + } /* * if the keyword is equal to currency .. then to get the display name |