From: Taylor R. Campbell Date: Sun, 27 Nov 2005 06:35:24 +0000 (+0000) Subject: Fix error in SUBSTRING->LINES with no default line-ending argument X-Git-Tag: 20090517-FFI~1177 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=327622e121949bdcdb2413fe104ae93e746e8114;p=mit-scheme.git Fix error in SUBSTRING->LINES with no default line-ending argument whereby STRING-LENGTH was passed the default object (#!DEFAULT), not the default line-ending string. --- diff --git a/v7/src/imail/imail-util.scm b/v7/src/imail/imail-util.scm index f93d21dcf..d8406083a 100644 --- a/v7/src/imail/imail-util.scm +++ b/v7/src/imail/imail-util.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: imail-util.scm,v 1.44 2004/02/16 05:49:16 cph Exp $ +$Id: imail-util.scm,v 1.45 2005/11/27 06:35:24 riastradh Exp $ Copyright 2000,2001,2003,2004 Massachusetts Institute of Technology @@ -156,9 +156,9 @@ USA. (if (default-object? line-ending) "\n" line-ending))) (define (substring->lines string start end #!optional line-ending) - (let ((line-ending (if (default-object? line-ending) "\n" line-ending)) - (n (string-length line-ending))) - (let ((indexes (substring-search-all line-ending string start end))) + (let ((line-ending (if (default-object? line-ending) "\n" line-ending))) + (let ((indexes (substring-search-all line-ending string start end)) + (n (string-length line-ending))) (if (pair? indexes) (begin (let loop ((start start) (indexes indexes))