[Libreoffice-bugs] [Bug 126071] Assertion failure in offline help viewer when searching for string starting or ending in non-alphanumeric character

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Jun 25 12:43:45 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=126071

--- Comment #2 from Julien Nabet <serval2412 at yahoo.fr> ---
This straightforward patch seems a good fix:
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 8f6ccd8af2be..8595cd436aef 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -207,7 +207,7 @@ namespace sfx2
         Boundary aBoundary = xBreak->getWordBoundary(
             rSearchString, nStartPos, aLocale,
WordType::ANYWORD_IGNOREWHITESPACES, true );

-        while ( aBoundary.startPos != aBoundary.endPos )
+        while ( aBoundary.endPos && aBoundary.startPos != aBoundary.endPos )
         {
             nStartPos = aBoundary.endPos;
             OUString sSearchToken( rSearchString.copy(

Gabor: I'll be able to submit it on gerrit review only after my daytime job so
if you want to give it a try or submit it to review, don't hesitate!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190625/8febed75/attachment.html>


More information about the Libreoffice-bugs mailing list