ICU-8613 fix a trivial bug found by PSV (a static analysis tool)

X-SVN-Rev: 30188
This commit is contained in:
Jungshik Shin 2011-06-02 22:08:21 +00:00
parent b22717a642
commit 8cc8801c03

View 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 {