]> granicus.if.org Git - icu/commitdiff
ICU-8613 fix a trivial bug found by PSV (a static analysis tool)
authorJungshik Shin <jshin@chromium.org>
Thu, 2 Jun 2011 22:08:21 +0000 (22:08 +0000)
committerJungshik Shin <jshin@chromium.org>
Thu, 2 Jun 2011 22:08:21 +0000 (22:08 +0000)
X-SVN-Rev: 30188

icu4c/source/i18n/ucol_sit.cpp

index 45f24ea9fe7ee7e120ad8737bf671f676590e216..d5a61c5d37e2397b55056164a35d030abe1879ca 100644 (file)
@@ -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 {