From e96a9fada56a1075f201910dfda71f2c7c031ce0 Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Wed, 15 Dec 2004 23:01:32 +0000 Subject: [PATCH] (scm_array_map_x): Check for at least one source argument. --- libguile/ramap.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libguile/ramap.c b/libguile/ramap.c index f241c6f09..bc8de47d6 100644 --- a/libguile/ramap.c +++ b/libguile/ramap.c @@ -913,6 +913,12 @@ SCM_DEFINE (scm_array_map_x, "array-map!", 2, 0, 1, { SCM_VALIDATE_PROC (2, proc); SCM_VALIDATE_REST_ARGUMENT (lra); + /* This is done as a test on lra, rather than an extra mandatory parameter + eval could check, so that the prototype for scm_array_map_x stays as it + was in the past. scm_array_map_x isn't actually documented, but did + get a mention in the NEWS file, so is best left alone. */ + if (scm_is_null (lra)) + SCM_WRONG_NUM_ARGS (); switch (SCM_TYP7 (proc)) { default: