summaryrefslogtreecommitdiff
path: root/src/lib/tng_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/tng_io.c')
-rw-r--r--src/lib/tng_io.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c
index 1f68388..bb6c26a 100644
--- a/src/lib/tng_io.c
+++ b/src/lib/tng_io.c
@@ -17635,7 +17635,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_num_frames_with_data_of_block_id_
stat = tng_frame_set_n_frames_of_data_block_get(tng_data, block_id, &curr_n_frames);
- while(stat == TNG_SUCCESS)
+ while(stat == TNG_SUCCESS && tng_data->current_trajectory_frame_set.next_frame_set_file_pos != -1)
{
*n_frames += curr_n_frames;
fseeko(tng_data->input_file,
@@ -17643,6 +17643,10 @@ tng_function_status DECLSPECDLLEXPORT tng_util_num_frames_with_data_of_block_id_
SEEK_SET);
stat = tng_frame_set_n_frames_of_data_block_get(tng_data, block_id, &curr_n_frames);
}
+ if(stat == TNG_SUCCESS)
+ {
+ *n_frames += curr_n_frames;
+ }
fseeko(tng_data->input_file, curr_file_pos, SEEK_SET);
if(stat == TNG_CRITICAL)
{
contact: Jan Huwald // Impressum