shithub: libmujs

Download patch

ref: 33c60e4d7b9d598543fe19347bc3f6ef23ccb288
parent: 9db2fce3a21165cda44ad16a1a0ede81246b52fd
author: Tor Andersson <tor.andersson@artifex.com>
date: Fri Jan 10 18:29:54 EST 2014

Fix bug.

--- a/jsdump.c
+++ b/jsdump.c
@@ -488,9 +488,9 @@
 	"ass", "ass_mul", "ass_div", "ass_mod", "ass_add",
 	"ass_sub", "ass_shl", "ass_shr", "ass_ushr",
 	"ass_bitand", "ass_bitxor", "ass_bitor", "comma",
-	"var", "block", "fundec", "nop", "var", "if",
-	"do", "while", "for", "for_var", "for_in",
-	"for_in_var", "continue", "break", "return",
+	"var-init", "block", "fundec", "nop", "var", "if",
+	"do-while", "while", "for", "for-var", "for-in",
+	"for-in-var", "continue", "break", "return",
 	"with", "switch", "throw", "try", "label",
 	"case", "default", "debugger",
 };
--- a/jsparse.c
+++ b/jsparse.c
@@ -438,7 +438,7 @@
 	js_Ast *a, *b, *c;
 	a = logor(J, notin);
 	if (accept(J, '?')) {
-		b = assignment(J, notin);
+		b = assignment(J, 0);
 		expect(J, ':');
 		c = assignment(J, notin);
 		return EXP3(COND, a, b, c);