From: Jungshik Shin Date: Thu, 2 Jun 2011 22:08:21 +0000 (+0000) Subject: ICU-8613 fix a trivial bug found by PSV (a static analysis tool) X-Git-Tag: milestone-59-0-1~4749 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8cc8801c031f7e29b87d075ad39afd39dc4e95d6;p=icu ICU-8613 fix a trivial bug found by PSV (a static analysis tool) X-SVN-Rev: 30188 --- diff --git a/icu4c/source/i18n/ucol_sit.cpp b/icu4c/source/i18n/ucol_sit.cpp index 45f24ea9fe7..d5a61c5d37e 100644 --- a/icu4c/source/i18n/ucol_sit.cpp +++ b/icu4c/source/i18n/ucol_sit.cpp @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 2004-2010, International Business Machines +* Copyright (C) 2004-2011, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************* * file name: ucol_sit.cpp @@ -239,7 +239,7 @@ _processVariableTop(CollatorSpec *spec, uint32_t value1, const char* string, UEr spec->variableTopString[i++] = readHexCodeUnit(&string, status); } spec->variableTopStringLen = i; - if(i == locElementCapacity && (*string != 0 || *string != '_')) { + if(i == locElementCapacity && *string != 0 && *string != '_') { *status = U_BUFFER_OVERFLOW_ERROR; } } else {