mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 08:53:20 +00:00
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:
parent
8864f1fd40
commit
0f3da69467
1 changed files with 10 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue