From: Markus Scherer Date: Thu, 30 Jun 2011 18:34:23 +0000 (+0000) Subject: ICU-8637 fix MessagePattern Part iteration when a plural style contains other followe... X-Git-Tag: milestone-59-0-1~4698 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1c626ed90ba0980df9fd9e23583848133d41790;p=icu 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 --- diff --git a/icu4c/source/i18n/plurfmt.cpp b/icu4c/source/i18n/plurfmt.cpp index 4424034ac85..750f924fe0a 100644 --- a/icu4c/source/i18n/plurfmt.cpp +++ b/icu4c/source/i18n/plurfmt.cpp @@ -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.