Kaydet (Commit) 67ab2ce3 authored tarafından Eike Rathke's avatar Eike Rathke

remove comment that makes no sense, tdf#94810 follow-up

nStart should not become <0, not even when searching for $ end.

Change-Id: I79586471f1a7908372fa3ee044a6f66499b1790f
üst 4cf1d290
...@@ -301,7 +301,7 @@ SearchResult TextSearch::searchForward( const OUString& searchStr, sal_Int32 sta ...@@ -301,7 +301,7 @@ SearchResult TextSearch::searchForward( const OUString& searchStr, sal_Int32 sta
for ( sal_Int32 k = 0; k < nGroups; k++ ) for ( sal_Int32 k = 0; k < nGroups; k++ )
{ {
const sal_Int32 nStart = sres.startOffset[k] - nExtraOffset; const sal_Int32 nStart = sres.startOffset[k] - nExtraOffset;
assert(nStart >= 0); // if not (e.g. searching for $ with ICU regex engine), then what? assert(nStart >= 0);
sres.startOffset[k] = (nStart < nOffsets ? offset[nStart] : (offset[nOffsets - 1] + 1)); sres.startOffset[k] = (nStart < nOffsets ? offset[nStart] : (offset[nOffsets - 1] + 1));
// JP 20.6.2001: end is ever exclusive and then don't return // JP 20.6.2001: end is ever exclusive and then don't return
// the position of the next character - return the // the position of the next character - return the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment