From c53ea2cf29ea32f9101e375380a92b94cc084373 Mon Sep 17 00:00:00 2001 From: "A. Jesse Jiryu Davis" Date: Fri, 30 Jun 2017 17:11:49 -0400 Subject: [PATCH] Unnecessary check in jsonsl_util_unescape_ex By the time JSONSL checks if a u-escape value is less than 0xDC00, it already knows it is greater than 0xD7FF. --- jsonsl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonsl.c b/jsonsl.c index e0b5bd7..a2c040d 100644 --- a/jsonsl.c +++ b/jsonsl.c @@ -1413,7 +1413,7 @@ size_t jsonsl_util_unescape_ex(const char *in, *oflags |= JSONSL_SPECIALf_NONASCII; out = jsonsl__writeutf8(uescval, out) - 1; - } else if (uescval > 0xD7FF && uescval < 0xDC00) { + } else if (uescval < 0xDC00) { *oflags |= JSONSL_SPECIALf_NONASCII; last_codepoint = (uint16_t)uescval; out--;