diff options
author | Thomas White <taw@physics.org> | 2020-07-03 12:35:25 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-29 18:53:45 +0200 |
commit | 7effcce394b5583bd632db8c55c9954d326985a7 (patch) | |
tree | df6914cc9fcaae9b10b4313d2520ba579a751955 /libcrystfel | |
parent | 0a09cfb254fad921b32be55f9946a6ca89946738 (diff) |
Don't double-count last chunk
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/stream.c | 4 |
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 ); |