ICU-5420 Return [0, 0] in SimpleSearch if there are no CEs in the pattern.
X-SVN-Rev: 23979
This commit is contained in:
parent
98f14bc209
commit
fb06489407
@ -1366,6 +1366,11 @@ static UBool simpleSearch(UCollator *coll, const UnicodeString &target, int32_t
|
||||
UBreakIterator *charBreakIterator = ubrk_open(UBRK_CHARACTER, ucol_getLocale(coll, ULOC_VALID_LOCALE, &status),
|
||||
target.getBuffer(), target.length(), &status);
|
||||
|
||||
if (patternSize == 0) {
|
||||
matchStart = matchEnd = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
matchStart = matchEnd = -1;
|
||||
|
||||
for(int32_t i = 0; i < targetSize; i += 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user