[Libreoffice-commits] core.git: comphelper/source

Stephan Bergmann sbergman at redhat.com
Tue Oct 22 06:56:03 PDT 2013


 comphelper/source/misc/syntaxhighlight.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1cbe2313edda8a04f0fe233b4a29ef4e2485f557
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Oct 22 15:55:21 2013 +0200

    Terminating NUL at end of its buffer is not considered part of OUString
    
    Change-Id: I3eb11659d1bd45327b66abb567e3ccf132d31915

diff --git a/comphelper/source/misc/syntaxhighlight.cxx b/comphelper/source/misc/syntaxhighlight.cxx
index 1995cd4..82fc060 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;
 }
 


More information about the Libreoffice-commits mailing list