From c68444ff76eff88fbfa63a3ddbd6b9ce72337159 Mon Sep 17 00:00:00 2001 From: Gediminas Jakutis Date: Sat, 13 Mar 2021 21:26:49 +0200 Subject: complete core featureset with linked list files. Signed-off-by: Gediminas Jakutis --- src/util.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/util.c') 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; -- cgit v1.2.3