summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linguistic/source/gciterator.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index e8178f8f9f..671f90e4bb 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;