summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 0fdc8ef0..7f797bb1 100644
--- a/lib.c
+++ b/lib.c
@@ -3575,8 +3575,12 @@ static val tuples_func(val n, val lcons)
val tuples(val n, val seq, val fill)
{
+ val self = lit("tuples");
seq = nullify(seq);
+ if (!plusp(n) || !integerp(n))
+ uw_throwf(error_s, lit("~a: positive integer required, not ~s"), self, n, nao);
+
if (!seq)
return nil;