summaryrefslogtreecommitdiff
path: root/source4/lib/appweb/ejs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-20 05:40:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:29:46 -0500
commit3473f6b74b4545d09234d198468b0229c621b1cb (patch)
treecfb2ec3865e552c8ae35da395db98295e3955cf2 /source4/lib/appweb/ejs
parent6f48b3a5cbe0235e60834f0b96a34290797d3bf4 (diff)
downloadsamba-3473f6b74b4545d09234d198468b0229c621b1cb.tar.gz
samba-3473f6b74b4545d09234d198468b0229c621b1cb.tar.bz2
samba-3473f6b74b4545d09234d198468b0229c621b1cb.zip
r8631: give an error on incorrect argument count
(This used to be commit ed09e19794d9625553bc48892a2e08b84d7bdcf4)
Diffstat (limited to 'source4/lib/appweb/ejs')
-rw-r--r--source4/lib/appweb/ejs/ejsParser.c7
1 files changed, 3 insertions, 4 deletions
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