mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 08:53:20 +00:00
ICU-2942 Don't go off the end of the string.
X-SVN-Rev: 13325
This commit is contained in:
parent
6154b69b6c
commit
c2fbe47c86
1 changed files with 6 additions and 4 deletions
|
@ -766,10 +766,12 @@ uloc_getVariant(const char* localeID,
|
|||
localeID = scriptID;
|
||||
}
|
||||
/* Skip the Country */
|
||||
_getCountry(localeID+1, NULL, 0, &localeID);
|
||||
if(_isIDSeparator(*localeID)) {
|
||||
haveVariant=TRUE;
|
||||
i=_getVariant(localeID+1, *localeID, variant, variantCapacity);
|
||||
if (_isIDSeparator(*localeID)) {
|
||||
_getCountry(localeID+1, NULL, 0, &localeID);
|
||||
if(_isIDSeparator(*localeID)) {
|
||||
haveVariant=TRUE;
|
||||
i=_getVariant(localeID+1, *localeID, variant, variantCapacity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue