another bug in reference implementation Francisco Solsona 12 Feb 2004 20:44 UTC
Hello,

Kirill Lisovsky found a new bug in the reference implementation of
SRFI-13.  This one affected, at least, the library included with PLT
Scheme.

The bug is on the inner loop of string-concatenate-reverse/shared:

(define (string-concatenate-reverse/shared string-list . maybe-final+end)
  (let-optionals* maybe-final+end ((final "" (string? final))
				   (end (string-length final)
					(and (integer? end)
					     (exact? end)
					     (<= 0 end (string-length final)))))
    ;; Add up the lengths of all the strings in STRING-LIST; also get a
    ;; pointer NZLIST into STRING-LIST showing where the first non-zero-length
    ;; string starts.
    (let lp ((len 0) (nzlist #f) (lis string-list))
      (if (pair? lis)
	  (let ((slen (string-length (car string-list))))
                                           ^^^^^^^^^^^
                                           lis

HTH,
--Francisco