|
|
@ -114,6 +114,7 @@ static jsmnerr_t jsmn_parse_string(jsmn_parser *parser, const char *js,
|
|
|
|
|
|
|
|
|
|
|
|
/* Backslash: Quoted symbol expected */
|
|
|
|
/* Backslash: Quoted symbol expected */
|
|
|
|
if (c == '\\') {
|
|
|
|
if (c == '\\') {
|
|
|
|
|
|
|
|
int i = 0;
|
|
|
|
parser->pos++;
|
|
|
|
parser->pos++;
|
|
|
|
switch (js[parser->pos]) {
|
|
|
|
switch (js[parser->pos]) {
|
|
|
|
/* Allowed escaped symbols */
|
|
|
|
/* Allowed escaped symbols */
|
|
|
@ -123,7 +124,6 @@ static jsmnerr_t jsmn_parse_string(jsmn_parser *parser, const char *js,
|
|
|
|
/* Allows escaped symbol \uXXXX */
|
|
|
|
/* Allows escaped symbol \uXXXX */
|
|
|
|
case 'u':
|
|
|
|
case 'u':
|
|
|
|
parser->pos++;
|
|
|
|
parser->pos++;
|
|
|
|
int i = 0;
|
|
|
|
|
|
|
|
for(; i < 4 && js[parser->pos] != '\0'; i++) {
|
|
|
|
for(; i < 4 && js[parser->pos] != '\0'; i++) {
|
|
|
|
/* If it isn't a hex character we have an error */
|
|
|
|
/* If it isn't a hex character we have an error */
|
|
|
|
if(!((js[parser->pos] >= 48 && js[parser->pos] <= 57) || /* 0-9 */
|
|
|
|
if(!((js[parser->pos] >= 48 && js[parser->pos] <= 57) || /* 0-9 */
|
|
|
|