mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-16 10:17:23 +00:00
ICU-8984 apply patch attached to ticket
X-SVN-Rev: 31169
This commit is contained in:
parent
a65dbd9267
commit
64064a7cf2
1 changed files with 2 additions and 2 deletions
|
@ -1797,7 +1797,7 @@ _canonicalize(const char* localeID,
|
|||
int32_t variantLen = _deleteVariant(variant, uprv_min(variantSize, (nameCapacity-len)), variantToCompare, n);
|
||||
len -= variantLen;
|
||||
if (variantLen > 0) {
|
||||
if (name[len-1] == '_') { /* delete trailing '_' */
|
||||
if (len > 0 && name[len-1] == '_') { /* delete trailing '_' */
|
||||
--len;
|
||||
}
|
||||
addKeyword = VARIANT_MAP[j].keyword;
|
||||
|
@ -1805,7 +1805,7 @@ _canonicalize(const char* localeID,
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (name[len-1] == '_') { /* delete trailing '_' */
|
||||
if (len > 0 && len <= nameCapacity && name[len-1] == '_') { /* delete trailing '_' */
|
||||
--len;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue