fix infinite loop in text search, tdf#99208
Change-Id: If77055d6b292d5126165252d7198e8abf9d2c44d Reviewed-on: https://gerrit.libreoffice.org/24029 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
This commit is contained in:
committed by
Eike Rathke
parent
34806c91fb
commit
087162b714
@@ -726,7 +726,7 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32
|
||||
bool bMightBeWord = true;
|
||||
bool bMightBeWordLast = true;
|
||||
//! All the variables above (plus ParseResult) have to be resetted on ssRewindFromValue!
|
||||
sal_Int32 nextCharIndex(0); // == index of nextChar
|
||||
sal_Int32 nextCharIndex(nPos); // == index of nextChar
|
||||
|
||||
while ((current != 0) && (eState != ssStop))
|
||||
{
|
||||
@@ -965,7 +965,7 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32
|
||||
r = ParseResult();
|
||||
index = nPos;
|
||||
postSymbolIndex = nPos;
|
||||
nextCharIndex = 0;
|
||||
nextCharIndex = nPos;
|
||||
aSymbol.clear();
|
||||
current = (index < rText.getLength()) ? rText.iterateCodePoints(&index) : 0;
|
||||
nCodePoints = (nPos < rText.getLength()) ? 1 : 0;
|
||||
|
||||
Reference in New Issue
Block a user