summaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index 47bf7a7..b2a3115 100644
--- a/src/util.c
+++ b/src/util.c
@@ -8,7 +8,14 @@ int stream_rewind(struct stream * const restrict in)
{
int ret = 0;
- in->cnode = in->cnode ? in->cache_l : NULL;
+ if (in->cnode) {
+ if (in->cache) {
+ in->cnode = in->cache_l;
+ } else {
+ in->cnode_f.file_offset = 0;
+ }
+ }
+
in->index = 0;
return ret;