diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-02-28 20:54:57 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-02-28 20:54:57 (GMT) |
commit | a4270d9abaa7f8aa76dcb49d55db67bb6aa3397a (patch) | |
tree | a0c84b581d6b8c4fb824702150106ccfdbea1b93 /src/H5Fseq.c | |
parent | a2d934b56a05f9fc8c81c00995c690db6af2f730 (diff) | |
download | hdf5-a4270d9abaa7f8aa76dcb49d55db67bb6aa3397a.zip hdf5-a4270d9abaa7f8aa76dcb49d55db67bb6aa3397a.tar.gz hdf5-a4270d9abaa7f8aa76dcb49d55db67bb6aa3397a.tar.bz2 |
[svn-r3528] Purpose:
Bug fix.
Description:
Fencepost error in determining number of elements to include in a
partial hyperslab for a chunk.
Solution:
Changed "<down_size[i]"s into "<=down_size[i]"s in a few places, to allow
for exactly one slab being left to output/input.
Platforms tested:
FreeBSD 4.2 (hawkwind)
Diffstat (limited to 'src/H5Fseq.c')
-rw-r--r-- | src/H5Fseq.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/H5Fseq.c b/src/H5Fseq.c index c369074..56026e2 100644 --- a/src/H5Fseq.c +++ b/src/H5Fseq.c @@ -239,7 +239,7 @@ printf("%s: leading_partials=%u\n",FUNC,leading_partials); * at coord[n]==0 for dimensions 1->(ndims-1) (i.e. starting at coordinate * zero for all dimensions except the slowest changing one */ - for(i=ndims-1; i>0 && seq_len>down_size[i]; i--) { + for(i=ndims-1; i>0 && seq_len>=down_size[i]; i--) { hsize_t partial_size; /* Size of the partial hyperslab in bytes */ /* Check if we have a partial hyperslab in this lower dimension */ @@ -291,7 +291,7 @@ printf("%s: after reading initial partial hyperslabs, seq_len=%lu\n",FUNC,(unsig #endif /* QAK */ /* Check if there is more than just a partial hyperslab to read */ - if(seq_len>down_size[0]) { + if(seq_len>=down_size[0]) { hsize_t tmp_seq_len; /* Temp. size of the sequence in elements */ hsize_t full_size; /* Size of the full hyperslab in bytes */ @@ -373,7 +373,7 @@ printf("%s: after reading 'middle' full hyperslabs, seq_len=%lu\n",FUNC,(unsigne */ for(i=1; i<(ndims-1); i++) { /* Check if there are enough elements to read in a row in this dimension */ - if(seq_len>down_size[i]) { + if(seq_len>=down_size[i]) { #ifdef QAK printf("%s: seq_len=%ld, down_size[%d]=%ld\n",FUNC,(long)seq_len,i+1,(long)down_size[i+1]); #endif /* QAK */ @@ -673,7 +673,7 @@ printf("%s: leading_partials=%u\n",FUNC,leading_partials); * at coord[n]==0 for dimensions 1->(ndims-1) (i.e. starting at coordinate * zero for all dimensions except the slowest changing one */ - for(i=ndims-1; i>0 && seq_len>down_size[i]; i--) { + for(i=ndims-1; i>0 && seq_len>=down_size[i]; i--) { hsize_t partial_size; /* Size of the partial hyperslab in bytes */ /* Check if we have a partial hyperslab in this lower dimension */ @@ -725,7 +725,7 @@ printf("%s: seq_len=%lu\n",FUNC,(unsigned long)seq_len); #endif /* QAK */ /* Check if there is more than just a partial hyperslab to read */ - if(seq_len>down_size[0]) { + if(seq_len>=down_size[0]) { hsize_t tmp_seq_len; /* Temp. size of the sequence in elements */ hsize_t full_size; /* Size of the full hyperslab in bytes */ @@ -807,7 +807,7 @@ printf("%s: seq_len=%lu\n",FUNC,(unsigned long)seq_len); */ for(i=1; i<(ndims-1); i++) { /* Check if there are enough elements to read in a row in this dimension */ - if(seq_len>down_size[i]) { + if(seq_len>=down_size[i]) { #ifdef QAK printf("%s: seq_len=%ld, down_size[%d]=%ld\n",FUNC,(long)seq_len,i+1,(long)down_size[i+1]); #endif /* QAK */ |