summaryrefslogtreecommitdiffstats
path: root/src/H5Shyper.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-03-24 21:56:52 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-03-24 21:56:52 (GMT)
commite0db90bcc422a1290286e0cae5d561fe765f2e68 (patch)
treed00cd16ea6e597f9deaed9d8d94d43a484121402 /src/H5Shyper.c
parent13299383ea1ddd9688f343ced7789a8a39f72099 (diff)
downloadhdf5-e0db90bcc422a1290286e0cae5d561fe765f2e68.zip
hdf5-e0db90bcc422a1290286e0cae5d561fe765f2e68.tar.gz
hdf5-e0db90bcc422a1290286e0cae5d561fe765f2e68.tar.bz2
[svn-r26559] Fix error in H5S_extent_copy (needs testing) - would not patch number of
elements selected with "all" slections nor reset sharing state. Fix error in H5S__hyper_project_intersection algorithm. Note there are still some code coverage assertions in the selection matching algorithm - if you hit these try taking them out. Note make check still fails in h5dump test (unrelated to this checkin). Tested: ummon
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r--src/H5Shyper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 1fd19fe..51460da 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -9085,11 +9085,11 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space,
int_sel_off = sis_off[sis_i] - ss_off[ss_i] + ss_sel_off;
if((ss_off[ss_i] + (hsize_t)ss_len[ss_i]) <= (sis_off[sis_i]
+ (hsize_t)sis_len[sis_i])) {
- int_len = (size_t)(ss_off[ss_i] + (hsize_t)ss_len[ss_i] - int_sel_off);
+ int_len = (size_t)((hsize_t)ss_len[ss_i] + ss_sel_off - int_sel_off);
advance_ss = TRUE;
} /* end if */
else
- int_len = (size_t)(sis_off[sis_i] + (hsize_t)sis_len[sis_i] - int_sel_off);
+ int_len = (size_t)(sis_off[sis_i] + (hsize_t)sis_len[sis_i] - ss_off[ss_i] + ss_sel_off - int_sel_off);
if((ss_off[ss_i] + (hsize_t)ss_len[ss_i]) >= (sis_off[sis_i]
+ (hsize_t)sis_len[sis_i]))
advance_sis = TRUE;
@@ -9102,7 +9102,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space,
ds_sel_off += (hsize_t)ds_len[ds_i];
if(++ds_i == ds_nseq) {
HDassert(0 && "Checking code coverage..."); //VDSINC
- HDassert(sis_nelem > 0);
+ HDassert(ds_nelem > 0);
/* Try to grab more sequences from dst_space */
if(H5S_SELECT_GET_SEQ_LIST(dst_space, 0u, &ds_iter, H5S_PROJECT_INTERSECT_NSEQS, ds_nelem, &ds_nseq, &nelem, ds_off, ds_len) < 0)