mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-16 02:07:15 +00:00
ICU-2119 fix bug in parsing
X-SVN-Rev: 11613
This commit is contained in:
parent
13f250dfaf
commit
f5b0cca143
1 changed files with 3 additions and 3 deletions
|
@ -658,9 +658,9 @@ ChoiceFormat::parse(const UnicodeString& text,
|
|||
double bestNumber = uprv_getNaN();
|
||||
double tempNumber = 0.0;
|
||||
for (int i = 0; i < fCount; ++i) {
|
||||
UnicodeString tempString = fChoiceFormats[i];
|
||||
if(text.compareBetween(start, tempString.length(), tempString, 0, tempString.length()) == 0) {
|
||||
status.setIndex(start + tempString.length());
|
||||
int32_t len = fChoiceFormats[i].length();
|
||||
if (text.compare(start, len, fChoiceFormats[i]) == 0) {
|
||||
status.setIndex(start + len);
|
||||
tempNumber = fChoiceLimits[i];
|
||||
if (status.getIndex() > furthest) {
|
||||
furthest = status.getIndex();
|
||||
|
|
Loading…
Add table
Reference in a new issue