summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib.c b/lib.c
index 11cf2f83..dd038866 100644
--- a/lib.c
+++ b/lib.c
@@ -5083,10 +5083,12 @@ toobig:
static val simple_lazy_stream_func(val stream, val lcons)
{
- if (set(mkloc(lcons->lc.car, lcons), get_line(stream)) != nil)
+ if (set(mkloc(lcons->lc.car, lcons), get_line(stream)) != nil) {
set(mkloc(lcons->lc.cdr, lcons), make_lazy_cons(lcons->lc.func));
- else
+ } else {
+ close_stream(stream, t);
lcons->lc.cdr = nil;
+ }
return nil;
}