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
commit8e2dbedaf18c9f9104e0b346d50732ca5a8ef69b (patch)
treebafb57ceeccec248aab3e9d616b61afe678bb5d2
parent07efe368b1c4514348259a0b7d90f6a14d0116d0 (diff)
downloadtxr-8e2dbedaf18c9f9104e0b346d50732ca5a8ef69b.tar.gz
txr-8e2dbedaf18c9f9104e0b346d50732ca5a8ef69b.tar.bz2
txr-8e2dbedaf18c9f9104e0b346d50732ca5a8ef69b.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) {