From 3473f6b74b4545d09234d198468b0229c621b1cb Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 20 Jul 2005 05:40:24 +0000 Subject: r8631: give an error on incorrect argument count (This used to be commit ed09e19794d9625553bc48892a2e08b84d7bdcf4) --- source4/lib/appweb/ejs/ejsParser.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source4/lib/appweb/ejs') diff --git a/source4/lib/appweb/ejs/ejsParser.c b/source4/lib/appweb/ejs/ejsParser.c index e7c44f4d6c..1f110e7ac4 100644 --- a/source4/lib/appweb/ejs/ejsParser.c +++ b/source4/lib/appweb/ejs/ejsParser.c @@ -2059,12 +2059,11 @@ static int evalFunction(Ejs *ep, MprVar *obj, int flags) formalArgs = prototype->function.args; argNames = (char**) formalArgs->handles; -#if FUTURE - if (formalArgs->used != actualArgs->used) { - ejsError(ep, "Bad number of args. Should be %d", formalArgs->used); + if (formalArgs->used > actualArgs->used) { + ejsError(ep, "Bad number of args. Should be %d", + formalArgs->used); return -1; } -#endif /* * Create the arguments and callee variables -- cgit