diff options
author | David Schulz <david.schulz@qt.io> | 2019-06-20 08:09:16 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2019-06-20 12:25:21 +0000 |
commit | 7b6ebea648bae91ee4ba014237eae34eb34d3805 (patch) | |
tree | 4cd3a24bf7b78d1ae6b41b3bc1c21ad3eba61897 /src/libs/3rdparty/syntax-highlighting/src/lib/rule.cpp | |
parent | bd3037464e6d1f6a3af7beb6c40a49b54433efca (diff) |
Update KSyntaxHighlighting 5.52 -> 5.59
Task-number: QTCREATORBUG-22558
Change-Id: I2eac03b54f2c2d330ee9b5d0037ee42a6640d76b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/libs/3rdparty/syntax-highlighting/src/lib/rule.cpp')
-rw-r--r-- | src/libs/3rdparty/syntax-highlighting/src/lib/rule.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libs/3rdparty/syntax-highlighting/src/lib/rule.cpp b/src/libs/3rdparty/syntax-highlighting/src/lib/rule.cpp index c48753bf0c5..d9cf5eb2116 100644 --- a/src/libs/3rdparty/syntax-highlighting/src/lib/rule.cpp +++ b/src/libs/3rdparty/syntax-highlighting/src/lib/rule.cpp @@ -59,7 +59,8 @@ static int matchEscapedChar(const QString &text, int offset) if (controlChars.contains(c)) return offset + 2; - if (c == QLatin1Char('x')) { // hex encoded character + // hex encoded character + if (c == QLatin1Char('x')) { auto newOffset = offset + 2; for (int i = 0; i < 2 && newOffset + i < text.size(); ++i, ++newOffset) { if (!isHexChar(text.at(newOffset))) @@ -70,14 +71,13 @@ static int matchEscapedChar(const QString &text, int offset) return newOffset; } - if (isOctalChar(c)) { // octal encoding + // octal encoding, simple \0 is OK, too, unlike simple \x above + if (isOctalChar(c)) { auto newOffset = offset + 2; for (int i = 0; i < 2 && newOffset + i < text.size(); ++i, ++newOffset) { if (!isOctalChar(text.at(newOffset))) break; } - if (newOffset == offset + 2) - return offset; return newOffset; } |