aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/stream.c4
1 files changed, 3 insertions, 1 deletions
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 );