summaryrefslogtreecommitdiffstats
path: root/src/stream.c
diff options
context:
space:
mode:
authorGravatar Gediminas Jakutis <gediminas@varciai.lt> 2021-03-14 19:49:07 +0200
committerGravatar Gediminas Jakutis <gediminas@varciai.lt> 2021-03-14 19:49:07 +0200
commit111d08d814720966d12fd57b58331c149df7e6cf (patch)
tree8c838a937767decc16579a3a3550e91c996de276 /src/stream.c
parent56f20e30636c16fd14205ba7c29cf8089caa1260 (diff)
downloadalgos-ld1-111d08d814720966d12fd57b58331c149df7e6cf.tar.gz
algos-ld1-111d08d814720966d12fd57b58331c149df7e6cf.tar.bz2
algos-ld1-111d08d814720966d12fd57b58331c149df7e6cf.zip
we can now print out stuff... things.
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
Diffstat (limited to 'src/stream.c')
-rw-r--r--src/stream.c4
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;