summaryrefslogtreecommitdiffstats
path: root/src/H5Distore.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-04-26 12:38:50 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-04-26 12:38:50 (GMT)
commit80043b04c036548fe4c47a1fc5acb8a544fbcb8d (patch)
tree1a9775bda29a35012d06bbc9289875ed364bb2ce /src/H5Distore.c
parentbb07809e41dea410814dd1233ad6db3f2312dbde (diff)
downloadhdf5-80043b04c036548fe4c47a1fc5acb8a544fbcb8d.zip
hdf5-80043b04c036548fe4c47a1fc5acb8a544fbcb8d.tar.gz
hdf5-80043b04c036548fe4c47a1fc5acb8a544fbcb8d.tar.bz2
[svn-r5271] Purpose:
Bug Fix. Description: When the fill value for a dataset is not set, the size is set to zero, causing problems with filling unused areas in previously defined chunks (i.e. when the dataset shrinks in size) Solution: Use the size of the elements in the dataset directly, instead of relying on the size of the fill value (which must be the same size). Platforms tested: FreeBSD 4.5 (sleipnir)
Diffstat (limited to 'src/H5Distore.c')
-rw-r--r--src/H5Distore.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/H5Distore.c b/src/H5Distore.c
index 1c2b137..f5bee8a 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -2940,7 +2940,11 @@ H5F_istore_initialize_by_extent(H5F_t *f, const H5O_layout_t *layout,
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to select hyperslab");
/* Fill the selection in the memory buffer */
- if(H5S_select_fill(fill.buf, fill.size, space_chunk, chunk) < 0)
+ /* Use the size of the elements in the chunk directly instead of */
+ /* relying on the fill.size, which might be set to 0 if there is */
+ /* no fill-value defined for the dataset -QAK */
+ H5_CHECK_OVERFLOW(size[rank],hsize_t,size_t);
+ if(H5S_select_fill(fill.buf, (size_t)size[rank], space_chunk, chunk) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTENCODE, FAIL, "filling selection failed");
if(H5F_istore_unlock(f, dxpl_id, layout, &pline, TRUE,