[Libreoffice-commits] .: linguistic/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Aug 4 05:49:32 PDT 2011


 linguistic/source/gciterator.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 3ad44e07dcd0b3b6013a692d4d58f0422aaf5932
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 4 13:49:19 2011 +0100

    don't assert about a bad value, if that's the fallback safely value

diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index e8178f8..671f90e 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -554,7 +554,10 @@ void GrammarCheckingIterator::DequeueAndCheck()
                         
                         //!! work-around to prevent looping if the grammar checker 
                         //!! failed to properly identify the sentence end
-                        if (aRes.nBehindEndOfSentencePosition <= nStartPos)
+                        if (
+                            aRes.nBehindEndOfSentencePosition <= nStartPos &&
+                            aRes.nBehindEndOfSentencePosition != nSuggestedEnd
+                           )
                         {
                             DBG_ASSERT( 0, "!! Grammarchecker failed to provide end of sentence !!" );
                             aRes.nBehindEndOfSentencePosition = nSuggestedEnd;


More information about the Libreoffice-commits mailing list