summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMagnus Lundborg <lundborg.magnus@gmail.com>2014-01-13 13:20:19 (GMT)
committerMagnus Lundborg <lundborg.magnus@gmail.com>2014-01-13 13:20:19 (GMT)
commit1fd4fcb39a138c57856d58c8de0a4193e3612d0c (patch)
tree17e71dcb1474341864a22720382171bce0708841 /src
parent8980e87a99995814ea2af0a048157ba6152e3092 (diff)
Reset the current frame set after counting the number of frame sets.
Diffstat (limited to 'src')
-rw-r--r--src/lib/tng_io.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c
index c8178ed..c17eeef 100644
--- a/src/lib/tng_io.c
+++ b/src/lib/tng_io.c
@@ -10855,6 +10855,7 @@ tng_function_status DECLSPECDLLEXPORT tng_num_frame_sets_get
int64_t long_stride_length, medium_stride_length;
int64_t file_pos;
tng_trajectory_frame_set_t frame_set;
+ struct tng_trajectory_frame_set orig_frame_set;
tng_gen_block_t block;
tng_function_status stat;
int64_t cnt = 0;
@@ -10862,6 +10863,8 @@ tng_function_status DECLSPECDLLEXPORT tng_num_frame_sets_get
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
TNG_ASSERT(n, "TNG library: n must not be a NULL pointer");
+ orig_frame_set = tng_data->current_trajectory_frame_set;
+
frame_set = &tng_data->current_trajectory_frame_set;
file_pos = tng_data->first_trajectory_frame_set_input_file_pos;
@@ -10987,6 +10990,8 @@ tng_function_status DECLSPECDLLEXPORT tng_num_frame_sets_get
*n = tng_data->n_trajectory_frame_sets = cnt;
+ *frame_set = orig_frame_set;
+
return(TNG_SUCCESS);
}
contact: Jan Huwald // Impressum