shithub: libmujs

Download patch

ref: 28643e6afb0c4a59b361a190d96c952c1c78ac77
parent: bd9920c5714bcfe51f3514d5df7b7b963d846058
author: Tor Andersson <tor.andersson@artifex.com>
date: Wed Jan 23 07:53:25 EST 2019

Bug 697891: Parse all JSON string escapes.

--- a/jslex.c
+++ b/jslex.c
@@ -739,8 +739,8 @@
 			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 @@
 		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;