From 7effcce394b5583bd632db8c55c9954d326985a7 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 3 Jul 2020 12:35:25 +0200 Subject: Don't double-count last chunk --- libcrystfel/src/stream.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index 8dfa343d..150bf0af 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -1489,7 +1489,9 @@ int stream_scan_chunks(Stream *st) } - st->chunk_offsets[st->n_chunks++] = ftell(st->fh); + if ( !done ) { + st->chunk_offsets[st->n_chunks++] = ftell(st->fh); + } } while ( !done ); -- cgit v1.2.3