Skip to content
Snippets Groups Projects
Commit 260d3351 authored by pw's avatar pw
Browse files

FD-STREAM-READ-N-BYTES was incorrectly returning 0 in the case

where the user buffer was bigger than the stream buffer and
the eof-error-p argument was NIL.
parent 2b1558a6
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/fd-stream.lisp,v 1.47 1999/01/15 09:27:35 dtc Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/fd-stream.lisp,v 1.48 1999/01/22 16:51:58 pw Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -767,11 +767,11 @@ non-server method is also significantly more efficient for large reads.
(unless count
(error "Error reading ~S: ~A" stream
(unix:get-unix-error-msg err)))
(decf now-needed count)
(if eof-error-p
(when (zerop count)
(error 'end-of-file :stream stream))
(return (- requested now-needed)))
(decf now-needed count)
(when (zerop now-needed) (return requested))
(incf offset count)))))
(t
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment