Skip to content

Commit

Permalink
parse_string: remove useless first byte marks for utf8
Browse files Browse the repository at this point in the history
  • Loading branch information
FSMaxB committed Feb 7, 2017
1 parent d7b5545 commit dded751
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cJSON.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,15 +396,13 @@ static unsigned parse_hex4(const unsigned char *str)
}

/* first bytes of UTF8 encoding for a given length in bytes */
static const unsigned char firstByteMark[7] =
static const unsigned char firstByteMark[5] =
{
0x00, /* should never happen */
0x00, /* 0xxxxxxx */
0xC0, /* 110xxxxx */
0xE0, /* 1110xxxx */
0xF0, /* 11110xxx */
0xF8,
0xFC
0xF0 /* 11110xxx */
};

/* Parse the input text into an unescaped cstring, and populate item. */
Expand Down

0 comments on commit dded751

Please sign in to comment.