aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cpphighlighter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cppeditor/cpphighlighter.cpp')
-rw-r--r--src/plugins/cppeditor/cpphighlighter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/cppeditor/cpphighlighter.cpp b/src/plugins/cppeditor/cpphighlighter.cpp
index 3b7827d211..51aa17eed4 100644
--- a/src/plugins/cppeditor/cpphighlighter.cpp
+++ b/src/plugins/cppeditor/cpphighlighter.cpp
@@ -396,6 +396,8 @@ bool CppHighlighter::highlightRawStringLiteral(const QStringView &_text, const T
if (text.at(tk.utf16charsEnd() - 1) != '"')
return false;
const int endDelimiterOffset = tk.utf16charsEnd() - 1 - delimiter.length();
+ if (endDelimiterOffset <= delimiterOffset)
+ return false;
if (text.mid(endDelimiterOffset, delimiter.length()) != delimiter)
return false;
if (text.at(endDelimiterOffset - 1) != ')')