original commit: 03e76c4d3be4e535411833f96805be225f223218
This commit is contained in:
Matthew Flatt 2005-04-30 14:46:17 +00:00
parent 7c533310cc
commit 531f899a00

View File

@ -1210,7 +1210,8 @@
(set! buf-end (- buf-end buf-start))
(set! buf-start 0))
(let* ([amt (bytes-length s)]
[c (read-bytes-avail!* buf port buf-end (+ buf-end amt))])
[c (read-bytes-avail!* buf port buf-end (min (bytes-length buf)
(+ buf-end amt)))])
(cond
[(or (eof-object? c)
(procedure? c))