r7085: fixed a bug in ejs with setting up the arguments[] array
authorAndrew Tridgell <tridge@samba.org>
Mon, 30 May 2005 06:06:27 +0000 (06:06 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:17:14 +0000 (13:17 -0500)
source/lib/ejs/ejsParser.c

index f9335ec0044ccb4a09e44048b7e27a203413e31e..d42d66bcf53afd6cb7adece16c429f4f6895ef70 100644 (file)
@@ -2069,6 +2069,8 @@ static int evalFunction(Ejs *ep, MprVar *obj, int flags)
                 */
                for (i = 0; i < formalArgs->used; i++) {
                        mprCreateProperty(ep->local, argNames[i], argValues[i]);
+               }
+               for (i = 0; i < actualArgs->used; i++) {
                        mprItoa(i, buf, sizeof(buf));
                        mprCreateProperty(&arguments, buf, argValues[i]);
                }