From 20f305f0c6577be1c95de373d0fe07998334234d Mon Sep 17 00:00:00 2001 From: Magnus Lundborg Date: Mon, 28 Jan 2013 09:37:18 +0100 Subject: Update first trajectory frame set (if needed) when writing frame set Conflicts: src/lib/tng_io.c diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c index eeba683..e6f2956 100644 --- a/src/lib/tng_io.c +++ b/src/lib/tng_io.c @@ -7981,7 +7981,6 @@ tng_function_status tng_frame_set_write(tng_trajectory_t tng_data, &tng_data->current_trajectory_frame_set; tng_function_status stat; - tng_data->current_trajectory_frame_set_output_file_pos = tng_data->last_trajectory_frame_set_output_file_pos = @@ -7992,6 +7991,12 @@ tng_function_status tng_frame_set_write(tng_trajectory_t tng_data, return(TNG_FAILURE); } + if(tng_data->first_trajectory_frame_set_output_file_pos == -1) + { + tng_data->first_trajectory_frame_set_output_file_pos = + tng_data->current_trajectory_frame_set_output_file_pos; + } + tng_block_init(&block); if(tng_frame_set_block_write(tng_data, block, hash_mode) != TNG_SUCCESS) -- cgit v0.10.1