ICU-3077 canonical search performed for full set of accents now. also added more detailed out-of-bounds checks

X-SVN-Rev: 12602
This commit is contained in:
Syn Wee Quek 2003-07-08 02:02:17 +00:00
parent 8864f1fd40
commit 0f3da69467

View file

@ -364,6 +364,16 @@ int32_t StringSearch::handleNext(int32_t position, UErrorCode &status)
setMatchNotFound();
return USEARCH_DONE;
}
if (m_search_->matchedLength <= 0) {
// the flipping direction issue has already been handled
// in next()
// for boundary check purposes. this will ensure that the
// next match will not preceed the current offset
// note search->matchedIndex will always be set to something
// in the code
m_search_->matchedIndex = position - 1;
}
ucol_setOffset(m_strsrch_->textIter, position, &status);
while (TRUE) {
if (m_search_->isCanonicalMatch) {