]> granicus.if.org Git - icu/commitdiff
ICU-8637 fix MessagePattern Part iteration when a plural style contains other followe...
authorMarkus Scherer <markus.icu@gmail.com>
Thu, 30 Jun 2011 18:34:23 +0000 (18:34 +0000)
committerMarkus Scherer <markus.icu@gmail.com>
Thu, 30 Jun 2011 18:34:23 +0000 (18:34 +0000)
X-SVN-Rev: 30260

icu4c/source/i18n/plurfmt.cpp

index 4424034ac85e49a10fb1a3e8e2a2f732805f3a5f..750f924fe0a40273fbb1db947f6f5e3f078da515 100644 (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.