From 0308a17597f802e3a9a2eb46f4884792cc895bbd Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Wed, 22 Apr 2015 11:01:33 -0500 Subject: [svn-r26883] Fix bug in H5S__hyper_project_intersection that could cause an incorrect result. Tested: ummon --- src/H5Shyper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 6c553d3..4a10ffc 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -9384,7 +9384,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, * finished being built) */ for(i = proj_rank - 1; ((i > 0) && (((proj_off / proj_down_dims[i - 1]) - % proj_space->extent.size[i]) + % proj_space->extent.size[i - 1]) != curr_span_dim[i - 1])); i--) { if(curr_span_tree[i]) { HDassert(prev_span[i]); @@ -9404,7 +9404,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, } /* end if */ /* Update curr_span_dim */ - curr_span_dim[i - 1] = (proj_off / proj_down_dims[i - 1]) % proj_space->extent.size[i]; + curr_span_dim[i - 1] = (proj_off / proj_down_dims[i - 1]) % proj_space->extent.size[i - 1]; } /* end for */ /* Compute bounds for new span in lowest dimension */ -- cgit v0.12