diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-04-29 12:29:25 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-04-29 16:45:45 +0200 |
commit | 7cc3d290779796b54f5b6fb1a4a32066f177d323 (patch) | |
tree | fb7bdde3f27defa2a2e793013340d576644a8497 | |
parent | 7c8b9fa98f4c5f7f5620e797dbbe24081e252548 (diff) |
Check iterator before dereference
... since commit b1148c31ed2786396f0b018a988fce8288f1797d
Author Noel Grandin <noel.grandin@collabora.co.uk>
Date Wed Apr 27 16:47:53 2022 +0200
use more string_view in comphelper
Change-Id: I182bc507b5693048350d6e54bb7b6176389e2241
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133596
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | comphelper/source/misc/syntaxhighlight.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/comphelper/source/misc/syntaxhighlight.cxx b/comphelper/source/misc/syntaxhighlight.cxx index 304e9e6b271f..de25fd158965 100644 --- a/comphelper/source/misc/syntaxhighlight.cxx +++ b/comphelper/source/misc/syntaxhighlight.cxx @@ -487,7 +487,7 @@ bool SyntaxHighlighter::Tokenizer::getNextToken(std::u16string_view::const_itera } // Object separator? Must be handled before Number - else if( c == '.' && ( *pos < '0' || *pos > '9' ) ) + else if( c == '.' && ( pos == end || *pos < '0' || *pos > '9' ) ) { reType = TokenType::Operator; } |