mirror of
https://github.com/DaveGamble/cJSON
synced 2025-01-12 18:10:43 +00:00
fix: add break in UTF-16 handling
Introducing the switch defaults in an earlier commit made UTF-16 \u sequence handling broken.
This commit is contained in:
parent
af6d5d3d7c
commit
ee0c920dff
1
cJSON.c
1
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
|
/* depending on the length in bytes this determines the
|
||||||
* encoding ofthe first UTF8 byte */
|
* encoding ofthe first UTF8 byte */
|
||||||
*--ptr2 = (unsigned char)((uc | firstByteMark[len]) & 0xFF);
|
*--ptr2 = (unsigned char)((uc | firstByteMark[len]) & 0xFF);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
*ep = str;
|
*ep = str;
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user