diff options
author | Thaddeus Crews <repiteo@outlook.com> | 2024-10-29 19:25:49 -0500 |
---|---|---|
committer | Thaddeus Crews <repiteo@outlook.com> | 2024-10-29 19:25:49 -0500 |
commit | 49cf7996e16b0e9b7b2b77e94085d18de21ece1b (patch) | |
tree | 07cf2a09367618d1eefb5b2e49b1b600bcaaba44 /thirdparty/icu4c/common/locdispnames.cpp | |
parent | 05a4620e88fc454e844f69e87a6eb444426c2a6e (diff) | |
parent | e698870caa3dff7234f0a4433b1751834b9e7811 (diff) | |
download | redot-engine-49cf7996e16b0e9b7b2b77e94085d18de21ece1b.tar.gz |
Merge pull request #98496 from bruvzg/icu761
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 |