From 017d8b1b94884a755fb5e4aa3d44d5e1b338e7ff Mon Sep 17 00:00:00 2001 From: Magnus Lundborg Date: Wed, 30 Jan 2013 16:39:37 +0100 Subject: Fix bug reading sparse data diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c index fd44205..0c88619 100644 --- a/src/lib/tng_io.c +++ b/src/lib/tng_io.c @@ -3207,6 +3207,8 @@ static tng_function_status tng_particle_data_read data->first_frame_with_data = first_frame_with_data; + n_frames = max(1, n_frames / stride_length); + switch(datatype) { case TNG_FLOAT_DATA: @@ -3979,7 +3981,7 @@ static tng_function_status tng_data_read(tng_trajectory_t tng_data, data->first_frame_with_data = first_frame_with_data; - n_frames = max(1, n_frames); + n_frames = max(1, n_frames / stride_length); switch(datatype) { @@ -4431,7 +4433,6 @@ static tng_function_status tng_data_block_contents_read hash_match_verify(block, &same_hash); if(same_hash != TRUE) { - printf("%s\n", block->hash); printf("Data block contents corrupt. Hashes do not match. %s: %d\n", __FILE__, __LINE__); // return(TNG_FAILURE); -- cgit v0.10.1