From 8cc8801c031f7e29b87d075ad39afd39dc4e95d6 Mon Sep 17 00:00:00 2001 From: Jungshik Shin Date: Thu, 2 Jun 2011 22:08:21 +0000 Subject: [PATCH] ICU-8613 fix a trivial bug found by PSV (a static analysis tool) X-SVN-Rev: 30188 --- icu4c/source/i18n/ucol_sit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 {