ICU-8637 fix MessagePattern Part iteration when a plural style contains other followed by a different keyword, and the PluralRules return other

X-SVN-Rev: 30260
This commit is contained in:
Markus Scherer 2011-06-30 18:34:23 +00:00
parent ea2123175f
commit a1c626ed90

View File

@ -419,10 +419,10 @@ int32_t PluralFormat::findSubMessage(const MessagePattern& pattern, int32_t part
// We have already seen an "other" sub-message.
// Do not match "other" again.
haveKeywordMatch=TRUE;
continue;
// Skip keyword matching but do getLimitPartIndex().
}
}
if(pattern.partSubstringMatches(*part, keyword)) {
if(!haveKeywordMatch && pattern.partSubstringMatches(*part, keyword)) {
// keyword matches
msgStart=partIndex;
// Do not match this keyword again.