From: David Vazquez Date: Fri, 4 Jan 2013 00:49:22 +0000 (+0000) Subject: read-until stops if it finds EOF X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=2b3df5f90ee2a63b4a86c0ca94f8a410740690a8;p=jscl.git read-until stops if it finds EOF --- diff --git a/lispstrack.lisp b/lispstrack.lisp index 1599261..f6aaee0 100644 --- a/lispstrack.lisp +++ b/lispstrack.lisp @@ -508,7 +508,7 @@ (let ((string "") (ch)) (setq ch (%peek-char stream)) - (while (not (funcall func ch)) + (while (and ch (not (funcall func ch))) (setq string (concat string (string ch))) (%read-char stream) (setq ch (%peek-char stream)))