From d7c00263f95bf78c91e81f2008d73099f69870a7 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 6 Sep 1999 11:04:12 -0500 Subject: [svn-r1629] Fixed error in point selections which was incorrectly computing the offsets of array elements for most datatypes. --- src/H5Spoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/H5Spoint.c b/src/H5Spoint.c index 3386275..0211c63 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -526,7 +526,7 @@ H5S_point_mgath (const void *_buf, size_t elmt_size, for(num_gath=0; num_gathpnt.elmt_left>0) { /* Compute the location of the point to get */ - for(i=space_ndims-1,acc=1,off=0; i>=0; i--) { + for(i=space_ndims-1,acc=elmt_size,off=0; i>=0; i--) { off+=(mem_iter->pnt.curr->pnt[i]+mem_space->select.offset[i])*acc; acc*=mem_size[i]; } /* end for */ @@ -608,7 +608,7 @@ H5S_point_mscat (const void *_tconv_buf, size_t elmt_size, for(num_scat=0; num_scatpnt.elmt_left>0) { /* Compute the location of the point to get */ - for(i=space_ndims-1,acc=1,off=0; i>=0; i--) { + for(i=space_ndims-1,acc=elmt_size,off=0; i>=0; i--) { off+=(mem_iter->pnt.curr->pnt[i]+mem_space->select.offset[i])*acc; acc*=mem_size[i]; } /* end for */ -- cgit v0.12