From 1cbe2313edda8a04f0fe233b4a29ef4e2485f557 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 22 Oct 2013 15:55:21 +0200 Subject: Terminating NUL at end of its buffer is not considered part of OUString Change-Id: I3eb11659d1bd45327b66abb567e3ccf132d31915 --- comphelper/source/misc/syntaxhighlight.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper') 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; } -- cgit