shithub: libmujs

Download patch

ref: 77ab465f1c394bb77f00966cd950650f3f53cb24
parent: 12a66c0a2143fa8851be2c4473598c48b184890a
author: Tor Andersson <tor.andersson@gmail.com>
date: Thu Jan 12 09:47:01 EST 2017

Fix 697401: Error when dropping extra arguments to lightweight functions.

--- a/jsrun.c
+++ b/jsrun.c
@@ -937,7 +937,7 @@
 	jsR_savescope(J, scope);
 
 	if (n > F->numparams) {
-		js_pop(J, F->numparams - n);
+		js_pop(J, n - F->numparams);
 		n = F->numparams;
 	}
 	for (i = n; i < F->varlen; ++i)