~ chicken-core (chicken-5) 4d285bb430f150d5fd881b89f1aab255b43c57d5
commit 4d285bb430f150d5fd881b89f1aab255b43c57d5 Author: felix <bunny351@gmail.com> AuthorDate: Tue Apr 27 12:13:59 2010 +0200 Commit: felix <bunny351@gmail.com> CommitDate: Tue Apr 27 12:13:59 2010 +0200 applied fix by Paul Romanchenko for broken peek-char with tcp ports diff --git a/tcp.scm b/tcp.scm index c2ac6ce4..b6e24eb1 100644 --- a/tcp.scm +++ b/tcp.scm @@ -408,7 +408,12 @@ EOF #:network-error (##sys#string-append "cannot close socket input port - " strerror) fd) ) ) ) - #f + (lambda () + (when (fx>= bufindex buflen) + (read-input)) + (if (fx< bufindex buflen) + (##core#inline "C_subchar" buf bufindex) + #!eof)) (lambda (p n dest start) ; read-string! (let loop ((n n) (m 0) (start start)) (cond ((eq? n 0) m)Trap