Fixed bug in %read-delimited! so the last char is not eaten if the
buffer is full
This commit is contained in:
parent
b79df3d6c1
commit
43b90a190a
|
@ -222,7 +222,6 @@
|
|||
;; This is the code for other kinds of ports.
|
||||
;; Mighty slow -- we read each char twice (peek first, then read).
|
||||
(let lp ((i start))
|
||||
(warn "use of read-delim lp")
|
||||
(let ((c (peek-char port)))
|
||||
(cond ((or (eof-object? c) ; Found terminating char or eof
|
||||
(char-set-contains? delims c))
|
||||
|
@ -230,7 +229,6 @@
|
|||
(values c (- i start)))
|
||||
|
||||
((>= i end) ; Filled the buffer.
|
||||
(if gobble? (read-char port))
|
||||
(values #f (- i start)))
|
||||
|
||||
(else (string-set! buf i (read-char port))
|
||||
|
|
Loading…
Reference in New Issue