From: Chris Hanson Date: Sat, 4 Feb 2017 21:39:29 +0000 (-0800) Subject: Fix bug in ttyio that causes premature exit on pipe/file input. X-Git-Tag: mit-scheme-pucked-9.2.12~220^2~175 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=660aa962c948641ae3af7487cbc78e26a9c58402;p=mit-scheme.git Fix bug in ttyio that causes premature exit on pipe/file input. --- diff --git a/src/runtime/ttyio.scm b/src/runtime/ttyio.scm index bbc8f299e..9a6356fb5 100644 --- a/src/runtime/ttyio.scm +++ b/src/runtime/ttyio.scm @@ -120,11 +120,12 @@ USA. (define (operation/read-finish port) (let loop () (if (char-ready? port) - (let ((char (read-char port))) + (let ((char (generic-io/peek-char port))) (if (not (eof-object? char)) (if (char-whitespace? char) - (loop) - (unread-char char port)))))) + (begin + (generic-io/read-char port) + (loop))))))) (output-port/discretionary-flush port)) (define (operation/discretionary-write-char char port)