ref: 833f82ca952952e6e584e3aaf258004b99f2b999
parent: b46ee8d829027bb4eb54a49498205dda98857b2a
author: Tor Andersson <[email protected]>
date: Thu May 3 06:38:55 EDT 2018
Fix issue #65: Uninitialized name in Function.prototype function.
--- a/jsfunction.c
+++ b/jsfunction.c
@@ -212,8 +212,10 @@
void jsB_initfunction(js_State *J)
{
+ J->Function_prototype->u.c.name = "Function.prototype";
J->Function_prototype->u.c.function = jsB_Function_prototype;
J->Function_prototype->u.c.constructor = NULL;
+ J->Function_prototype->u.c.length = 0;
js_pushobject(J, J->Function_prototype);
{