From ee0c920dffb2e57e6a914f8c33141bf376134b55 Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Sat, 4 Feb 2017 01:54:56 +0100 Subject: [PATCH] fix: add break in UTF-16 handling Introducing the switch defaults in an earlier commit made UTF-16 \u sequence handling broken. --- cJSON.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cJSON.c b/cJSON.c index 6978f47..006ac44 100644 --- a/cJSON.c +++ b/cJSON.c @@ -665,6 +665,7 @@ static const unsigned char *parse_string(cJSON *item, const unsigned char *str, /* depending on the length in bytes this determines the * encoding ofthe first UTF8 byte */ *--ptr2 = (unsigned char)((uc | firstByteMark[len]) & 0xFF); + break; default: *ep = str; return NULL; -- GitLab