diff --git a/srfi/ChangeLog b/srfi/ChangeLog index ca097e012..d67d3580c 100644 --- a/srfi/ChangeLog +++ b/srfi/ChangeLog @@ -1,3 +1,8 @@ +2001-07-03 Martin Grabmueller + + * srfi-1.scm (list-tabulate): Do not go into infinite loop for + invalid arguments. + 2001-07-02 Martin Grabmueller * srfi-1.scm: Replaced calls to `map' in several procedures to diff --git a/srfi/srfi-1.scm b/srfi/srfi-1.scm index f0ef31055..34f71739b 100644 --- a/srfi/srfi-1.scm +++ b/srfi/srfi-1.scm @@ -242,7 +242,7 @@ (define (list-tabulate n init-proc) (let lp ((n n) (acc '())) - (if (zero? n) + (if (<= n 0) acc (lp (- n 1) (cons (init-proc (- n 1)) acc)))))