shithub: libmujs

Download patch

ref: bf4ac9420739b4ac3bc963bd2c7b69de36a8bb11
parent: 69e2767d0a8e58054542cc30a67de7ece0659965
author: Tor Andersson <tor.andersson@artifex.com>
date: Wed Oct 26 16:42:29 EDT 2022

Set length of output array Array.prototype.map.

--- a/jsarray.c
+++ b/jsarray.c
@@ -583,6 +583,7 @@
 			js_pop(J, 1);
 		}
 	}
+	js_setlength(J, -1, len);
 }
 
 static void Ap_filter(js_State *J)