mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-23 13:01:42 -08:00
Merge branch 'develop' into 'develop'
Prevent CLOS' stream-read-line from signalling end-of-file while reading unterminated lines. See merge request !40
This commit is contained in:
commit
2cce45b5c6
2 changed files with 5 additions and 2 deletions
|
|
@ -1630,7 +1630,7 @@ do_read_delimited_list(int d, cl_object in, bool proper_list)
|
|||
if (!ECL_ANSI_STREAM_P(strm)) {
|
||||
value0 = _ecl_funcall2(@'gray::stream-read-line', strm);
|
||||
value1 = ecl_nth_value(the_env, 1);
|
||||
if (!Null(value1)) {
|
||||
if (Null(value0) && !Null(value1)) {
|
||||
if (!Null(eof_errorp))
|
||||
FEend_of_file(strm);
|
||||
value0 = eof_value;
|
||||
|
|
|
|||
|
|
@ -512,7 +512,10 @@
|
|||
(loop
|
||||
(let ((ch (stream-read-char stream)))
|
||||
(cond ((eq ch :eof)
|
||||
(return (values (si::shrink-vector res index) t)))
|
||||
(return (values (if (zerop index)
|
||||
nil
|
||||
(si::shrink-vector res index))
|
||||
t)))
|
||||
(t
|
||||
(when (char= ch #\newline)
|
||||
(return (values (si::shrink-vector res index) nil)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue