mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
utf16_literal_to_utf8: Support \u0000
This commit is contained in:
parent
80bc7652ae
commit
c837177a56
2
cJSON.c
2
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);
|
first_code = parse_hex4(first_sequence + 2);
|
||||||
|
|
||||||
/* check that the code is valid */
|
/* 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;
|
*error_pointer = first_sequence;
|
||||||
goto fail;
|
goto fail;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user