summaryrefslogtreecommitdiff
path: root/linguistic/source/gciterator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'linguistic/source/gciterator.cxx')
-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 26cbb9f1a521..5939b1d97152 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;