diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-01-30 15:39:37 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-01-30 15:39:37 (GMT) |
commit | 017d8b1b94884a755fb5e4aa3d44d5e1b338e7ff (patch) | |
tree | a298b7ee3c425b8ceb329e33824a6c5c8b5c8afa /src | |
parent | a02d030e2862feacecf580c909a25adce8ef64ed (diff) |
Fix bug reading sparse data
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/tng_io.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); |