summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang-tools-extra/clangd/JSONExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/clangd/JSONExpr.cpp b/clang-tools-extra/clangd/JSONExpr.cpp
index 071fdbf42ef..f28dcffab6a 100644
--- a/clang-tools-extra/clangd/JSONExpr.cpp
+++ b/clang-tools-extra/clangd/JSONExpr.cpp
@@ -344,7 +344,7 @@ bool Parser::parseUnicode(std::string &Out) {
uint16_t Second;
if (!Parse4Hex(Second))
return false;
- if (Second < 0xDC00 && Second >= 0xE000) {
+ if (Second < 0xDC00 || Second >= 0xE000) {
Invalid(); // Leading surrogate not followed by trailing.
First = Second; // Second escape still needs to be processed.
continue;
OpenPOWER on IntegriCloud