From 707cafb2d8fa266a3812be2f42ccd1952533e9e5 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Fri, 3 Jul 2015 17:45:49 +0200 Subject: [PATCH] src/h5core/h5u_model.c: - bugfix with h5u_set_view (0, -1) --- src/h5core/h5u_model.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/h5core/h5u_model.c b/src/h5core/h5u_model.c index e7122ce..173447c 100644 --- a/src/h5core/h5u_model.c +++ b/src/h5core/h5u_model.c @@ -231,7 +231,7 @@ h5u_reset_view ( /* if start == -1 && end == -1 -> reset view - elif end == -1 -> select zero particles + elif end == -1 -> select to end */ h5_err_t @@ -264,7 +264,10 @@ h5u_set_view ( * many particles there should be! */ H5_CORE_API_LEAVE (H5_SUCCESS); } - + if (end < 0) { + end = total+end; + } + if (start < 0 || start >= total) { H5_CORE_API_LEAVE ( h5_error(