ICU-8675 Fixed a time zone parse regression problem. The condition used for checking perfect match was wrong.

X-SVN-Rev: 30266
This commit is contained in:
Yoshito Umaoka 2011-07-01 21:07:32 +00:00
parent c997b7a1f9
commit aaca2b7e95
2 changed files with 2 additions and 2 deletions

View File

@ -972,7 +972,7 @@ TimeZoneGenericNames::findLocal(const UnicodeString& text, int32_t start, uint32
int32_t maxLen = 0;
UVector *results = handler.getMatches(maxLen);
if ((results != NULL && (maxLen == (text.length() - start))) || fGNamesTrieFullyLoaded) {
if (results != NULL && ((maxLen == (text.length() - start)) || fGNamesTrieFullyLoaded)) {
// perfect match
gmatchInfo = new TimeZoneGenericNameMatchInfo(results);
if (gmatchInfo == NULL) {

View File

@ -1351,7 +1351,7 @@ TimeZoneNamesImpl::find(const UnicodeString& text, int32_t start, uint32_t types
int32_t maxLen = 0;
UVector *results = handler.getMatches(maxLen);
if ((results != NULL && (maxLen == (text.length() - start))) || fNamesTrieFullyLoaded) {
if (results != NULL && ((maxLen == (text.length() - start)) || fNamesTrieFullyLoaded)) {
// perfect match
matchInfo = new TimeZoneNameMatchInfoImpl(results);
if (matchInfo == NULL) {