summaryrefslogtreecommitdiff
path: root/sw/source/core/edit/edlingu.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/edit/edlingu.cxx')
-rw-r--r--sw/source/core/edit/edlingu.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 96ca62708dc4..e95f9676c701 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -1160,7 +1160,7 @@ bool SwEditShell::GetGrammarCorrection(
// return suggestions for first error that includes the given error position
const linguistic2::SingleProofreadingError &rError = rResult.aErrors[i];
if (rError.nErrorStart <= rErrorPosInText &&
- rErrorPosInText < rError.nErrorStart + rError.nErrorLength)
+ rErrorPosInText + nLen <= rError.nErrorStart + rError.nErrorLength)
{
rSuggestions = rError.aSuggestions;
rErrorIndexInResult = i;