diff --git a/ice-9/format.scm b/ice-9/format.scm index b116687b8..922f62be4 100644 --- a/ice-9/format.scm +++ b/ice-9/format.scm @@ -614,8 +614,7 @@ (case modifier ((colon) (if (not max-iterations) (set! max-iterations 1))) - ((colon-at at) (format:error "illegal modifier")) - (else (if (not max-iterations) (set! max-iterations 100)))) + ((colon-at at) (format:error "illegal modifier"))) (if (not (null? params)) (format:error "no parameters allowed in ~~}")) (if (zero? iteration-nest) @@ -637,7 +636,8 @@ (list-tail args arg-pos)))) (i 0 (+ i 1))) ((or (>= arg-pos args-len) - (>= i max-iterations)))))) + (and max-iterations + (>= i max-iterations))))))) ((sublists) (let ((args (next-arg)) (args-len 0)) @@ -646,7 +646,8 @@ (set! args-len (length args)) (do ((arg-pos 0 (+ arg-pos 1))) ((or (>= arg-pos args-len) - (>= arg-pos max-iterations))) + (and max-iterations + (>= arg-pos max-iterations)))) (let ((sublist (list-ref args arg-pos))) (if (not (list? sublist)) (format:error @@ -663,7 +664,8 @@ args arg-pos)))) (i 0 (+ i 1))) ((or (>= arg-pos args-len) - (>= i max-iterations)) + (and max-iterations + (>= i max-iterations))) arg-pos)))) (add-arg-pos usedup-args))) ((rest-sublists) @@ -672,7 +674,8 @@ (usedup-args (do ((arg-pos 0 (+ arg-pos 1))) ((or (>= arg-pos args-len) - (>= arg-pos max-iterations)) + (and max-iterations + (>= arg-pos max-iterations))) arg-pos) (let ((sublist (list-ref args arg-pos))) (if (not (list? sublist))