From 327622e121949bdcdb2413fe104ae93e746e8114 Mon Sep 17 00:00:00 2001 From: "Taylor R. Campbell" Date: Sun, 27 Nov 2005 06:35:24 +0000 Subject: [PATCH] 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. --- v7/src/imail/imail-util.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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)) -- 2.25.1