Fix COPY-STREAM when called without an explicit END argument.
authorZach Beane <xach@xach.com>
Wed, 7 Mar 2012 03:35:42 +0000 (09:35 +0600)
committerAttila Lendvai <attila.lendvai@gmail.com>
Wed, 7 Mar 2012 03:35:42 +0000 (09:35 +0600)
io.lisp

diff --git a/io.lisp b/io.lisp
index 637c9be..ee89cb0 100644 (file)
--- a/io.lisp
+++ b/io.lisp
@@ -115,7 +115,8 @@ compatible element-types."
   (check-type start non-negative-integer)
   (check-type end (or null non-negative-integer))
   (check-type buffer-size positive-integer)
-  (when (< end start)
+  (when (and end
+             (< end start))
     (error "END is smaller than START in ~S" 'copy-stream))
   (let ((output-position 0)
         (input-position 0))