Fixing source line miscalculation in read-line for non-string-stream builds.

This commit is contained in:
Alex Shinn 2013-08-04 15:37:53 +09:00
parent 3193dcb650
commit 43b6f6496a

View file

@ -93,7 +93,9 @@
(let ((in (if (pair? o) (car o) (current-input-port))) (let ((in (if (pair? o) (car o) (current-input-port)))
(n (if (and (pair? o) (pair? (cdr o))) (car (cdr o)) 8192))) (n (if (and (pair? o) (pair? (cdr o))) (car (cdr o)) 8192)))
(let ((res (%read-line n in))) (let ((res (%read-line n in)))
(port-line-set! in (+ 1 (port-line in))) (cond-expand
(string-streams
(port-line-set! in (+ 1 (port-line in)))))
(if (not res) (if (not res)
eof eof
(let ((len (string-length res))) (let ((len (string-length res)))