summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-03-13 19:19:02 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-03-13 19:19:02 -0700
commit62e9ae484fd396a882db42e9c0c861ae666450d9 (patch)
treebafb57ceeccec248aab3e9d616b61afe678bb5d2
parent909e7bfb11a99eee70f69a9c244cb1aeee279c1f (diff)
downloadtxr-62e9ae484fd396a882db42e9c0c861ae666450d9.tar.gz
txr-62e9ae484fd396a882db42e9c0c861ae666450d9.tar.bz2
txr-62e9ae484fd396a882db42e9c0c861ae666450d9.zip
regression: excess args not diagnosed.
This was caused by the recent work to reduce consing in generic_funcall. * lib.c (generic_funcall): Correct test for too many arguments. Because we don't normalize the argument list to the exact number of fixed args, but to at least the fixed args, the excess args can possibly be part of the fill rather than part of the list.
-rw-r--r--lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index 014fd227..4906032e 100644
--- a/lib.c
+++ b/lib.c
@@ -6170,7 +6170,7 @@ val generic_funcall(val fun, struct args *args_in)
if (args->fill < reqargs)
callerror(fun, lit("missing required arguments"));
- if (args->list)
+ if (args->fill > fixparam || args->list)
callerror(fun, lit("too many arguments"));
switch (fun->f.functype) {