~ chicken-core (chicken-5) 1603c5205c50ac8c23aef3af971b40b8aaf6c0a2
commit 1603c5205c50ac8c23aef3af971b40b8aaf6c0a2
Author: felix <bunny351@gmail.com>
AuthorDate: Tue Apr 27 12:13:59 2010 +0200
Commit: felix <bunny351@gmail.com>
CommitDate: Fri Apr 30 12:24:36 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