cJSON

mirror of Dave's cJSON
git clone git://git.thc420.xyz/cJSON
Log | Files | Refs | README | LICENSE

commit ee0c920dffb2e57e6a914f8c33141bf376134b55
parent af6d5d3d7c1538b7a13ede72da76a0d582fc5441
Author: Max Bruckner <max@maxbruckner.de>
Date:   Sat,  4 Feb 2017 01:54:56 +0100

fix: add break in UTF-16 handling

Introducing the switch defaults in an earlier commit made UTF-16 \u
sequence handling broken.

Diffstat:
McJSON.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git 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;