summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comphelper/source/misc/syntaxhighlight.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/comphelper/source/misc/syntaxhighlight.cxx b/comphelper/source/misc/syntaxhighlight.cxx
index 1995cd413d36..82fc060894cc 100644
--- a/comphelper/source/misc/syntaxhighlight.cxx
+++ b/comphelper/source/misc/syntaxhighlight.cxx
@@ -540,7 +540,7 @@ sal_Bool SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
// All other will remain TT_UNKNOWN
// Save end position
- rpEndPos = mpActualPos;
+ rpEndPos = *mpActualPos == CHAR_EOF ? mpActualPos - 1 : mpActualPos;
return sal_True;
}