mirror of
https://github.com/ccxvii/mujs.git
synced 2026-02-05 17:29:43 +08:00
Bug 697891: Parse all JSON string escapes.
This commit is contained in:
5
jslex.c
5
jslex.c
@@ -739,8 +739,8 @@ static int lexjsonnumber(js_State *J)
|
||||
jsY_next(J);
|
||||
else
|
||||
jsY_error(J, "unexpected non-digit");
|
||||
if (jsY_accept(J, '.'))
|
||||
{
|
||||
|
||||
if (jsY_accept(J, '.')) {
|
||||
if (isdigit(J->lexchar))
|
||||
while (isdigit(J->lexchar))
|
||||
jsY_next(J);
|
||||
@@ -780,6 +780,7 @@ static int lexjsonescape(js_State *J)
|
||||
break;
|
||||
case '"': textpush(J, '"'); jsY_next(J); break;
|
||||
case '\\': textpush(J, '\\'); jsY_next(J); break;
|
||||
case '/': textpush(J, '/'); jsY_next(J); break;
|
||||
case 'b': textpush(J, '\b'); jsY_next(J); break;
|
||||
case 'f': textpush(J, '\f'); jsY_next(J); break;
|
||||
case 'n': textpush(J, '\n'); jsY_next(J); break;
|
||||
|
||||
Reference in New Issue
Block a user