From c837177a56c1fe05b3fbcb3687144b6de089dcdc Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Tue, 21 Mar 2017 21:14:37 +0100 Subject: [PATCH] utf16_literal_to_utf8: Support \u0000 --- cJSON.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cJSON.c b/cJSON.c index 8129a67..c1a2e24 100644 --- a/cJSON.c +++ b/cJSON.c @@ -556,7 +556,7 @@ static unsigned char utf16_literal_to_utf8(const unsigned char * const input_poi first_code = parse_hex4(first_sequence + 2); /* check that the code is valid */ - if (((first_code >= 0xDC00) && (first_code <= 0xDFFF)) || (first_code == 0)) + if (((first_code >= 0xDC00) && (first_code <= 0xDFFF))) { *error_pointer = first_sequence; goto fail;