From f328c0537f0d056a2ac3024347b92cc88be90d77 Mon Sep 17 00:00:00 2001 From: mainzelm Date: Tue, 17 Feb 2004 16:07:22 +0000 Subject: [PATCH] In copy-ascii-port->port, get length of line only after checking for EOF. --- scheme/lib/ftp-library.scm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scheme/lib/ftp-library.scm b/scheme/lib/ftp-library.scm index 9419b98..66c757f 100644 --- a/scheme/lib/ftp-library.scm +++ b/scheme/lib/ftp-library.scm @@ -37,10 +37,9 @@ (define (copy-ascii-port->port input-port output-port) (let loop () (let* ((line (read-crlf-line input-port - #f)) - (length (string-length line))) + #f))) (if (not (eof-object? line)) - (begin + (let ((length (string-length line))) (write-string line output-port 0 length) (newline output-port) (loop)))))