ICU-4045 regexp::find(), fix incorrect resut when called repeatedly at end of input string.
X-SVN-Rev: 16117
This commit is contained in:
parent
422c958275
commit
afb730458f
@ -885,6 +885,11 @@ int32_t RegexCImpl::appendTail(URegularExpression *regexp,
|
||||
// The last call to find() on this matcher failed().
|
||||
// Look back to the end of the last find() that succeeded for src index.
|
||||
srcIdx = m->fLastMatchEnd;
|
||||
if (srcIdx == -1) {
|
||||
// There has been no successful match with this matcher.
|
||||
// We want to copy the whole string.
|
||||
srcIdx = 0;
|
||||
}
|
||||
}
|
||||
|
||||
int32_t destIdx = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user