diff options
Diffstat (limited to 'src/stream.c')
-rw-r--r-- | src/stream.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |