From e6e85d562829bcae40f9b360937b491699736b92 Mon Sep 17 00:00:00 2001 From: Magnus Lundborg Date: Tue, 1 Jul 2014 11:39:06 +0200 Subject: Fix bug causing reading next frame not to stop. Change-Id: I132d22f4e7e7dbdea14351e2e813a391590d58b9 diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c index fa4d3e5..d0028bd 100644 --- a/src/lib/tng_io.c +++ b/src/lib/tng_io.c @@ -17379,6 +17379,10 @@ tng_function_status DECLSPECDLLEXPORT tng_util_particle_data_next_frame_read { return(stat); } + if(frame_set->first_frame + frame_set->n_frames - 1 < i) + { + return(TNG_FAILURE); + } i = frame_set->first_frame; } } @@ -17539,6 +17543,10 @@ tng_function_status DECLSPECDLLEXPORT tng_util_non_particle_data_next_frame_read { return(stat); } + if(frame_set->first_frame + frame_set->n_frames - 1 < i) + { + return(TNG_FAILURE); + } i = frame_set->first_frame; } } -- cgit v0.10.1