summaryrefslogtreecommitdiffstats
path: root/src/H5Spoint.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1999-09-06 16:04:12 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1999-09-06 16:04:12 (GMT)
commitd7c00263f95bf78c91e81f2008d73099f69870a7 (patch)
treeeb79fac3da837da5db95d73467c47ab65bb7bbf4 /src/H5Spoint.c
parentcb0a0eb41eb61e75ddb7a10532e910394babe995 (diff)
downloadhdf5-d7c00263f95bf78c91e81f2008d73099f69870a7.zip
hdf5-d7c00263f95bf78c91e81f2008d73099f69870a7.tar.gz
hdf5-d7c00263f95bf78c91e81f2008d73099f69870a7.tar.bz2
[svn-r1629] Fixed error in point selections which was incorrectly computing the offsets of
array elements for most datatypes.
Diffstat (limited to 'src/H5Spoint.c')
-rw-r--r--src/H5Spoint.c4
1 files 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_gath<nelmts; num_gath++) {
if(mem_iter->pnt.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_scat<nelmts; num_scat++) {
if(mem_iter->pnt.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 */