From 111d08d814720966d12fd57b58331c149df7e6cf Mon Sep 17 00:00:00 2001 From: Gediminas Jakutis Date: Sun, 14 Mar 2021 19:49:07 +0200 Subject: we can now print out stuff... things. Signed-off-by: Gediminas Jakutis --- src/stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/stream.c') diff --git a/src/stream.c b/src/stream.c index 6a84940..13df929 100644 --- a/src/stream.c +++ b/src/stream.c @@ -58,7 +58,7 @@ int stream_close(struct stream * const in) { int ret = 0; - if (in->type != stream_out) { + if (in->type != stream_out || in->settings->opmode == mode_fetch) { goto out; } @@ -233,7 +233,7 @@ int stream_shallow_copy(struct stream const * const restrict src, struct stream { int ret = 0; - dest->n = src->n; + dest->n = dest->n ? dest->n : src->n; dest->settings = src->settings; dest->index = 0; -- cgit v1.2.3