summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-10-01 18:56:51 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-10-01 18:56:51 (GMT)
commit849d36019d929c409c50cce08842354139dca2f8 (patch)
tree360639325199a5d2a59ea02d3a9e4ee2662016f9 /src/H5Tconv.c
parentd809c9309b7fa204ed9f94409228d01087f8b00a (diff)
downloadhdf5-849d36019d929c409c50cce08842354139dca2f8.zip
hdf5-849d36019d929c409c50cce08842354139dca2f8.tar.gz
hdf5-849d36019d929c409c50cce08842354139dca2f8.tar.bz2
[svn-r733]
Changes since 19980930 ---------------------- ./MANIFEST ./doc/html/H5.format.html ./src/H5D.c ./src/H5Dprivate.h ./src/H5Farray.c ./src/H5Fistore.c ./src/H5Fprivate.h ./src/H5O.c ./src/H5Ofill.c [NEW] ./src/H5Oprivate.h ./src/H5P.c ./src/H5Ppublic.h ./src/H5Sall.c ./src/H5Shyper.c ./src/H5Spoint.c ./src/H5Sprivate.h ./src/Makefile.in Added fill values as documented in previous e-mails. They only work for chunked datasets so far. ./src/H5E.c ./src/H5Epublic.h ./src/H5P.c Changed H5E_TEMPLATE to H5E_PLIST. ./src/H5Omtime.c ./src/H5V.c Fixed a typo in a comment. ./src/H5Tconv.c Fixed a bug in compound type conversions that caused an assertion to fail.
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r--src/H5Tconv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 0f1d120..76d92c9 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -517,16 +517,18 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if (src2dst[i]<0) continue;
src_memb = src->u.compnd.memb + i;
dst_memb = dst->u.compnd.memb + src2dst[i];
- offset -= dst_memb->size;
if (dst_memb->size > src_memb->size) {
H5T_conv_t tconv_func = priv->memb_conv[src2dst[i]];
H5T_cdata_t *memb_cdata = priv->memb_cdata[src2dst[i]];
+ offset -= src_memb->size;
memb_cdata->command = H5T_CONV_CONV;
(tconv_func)(priv->src_memb_id[src2dst[i]],
priv->dst_memb_id[src2dst[i]],
memb_cdata, priv->memb_nelmts[i],
buf+offset, bkg+dst_memb->offset);
+ } else {
+ offset -= dst_memb->size;
}
HDmemmove (bkg+dst_memb->offset, buf+offset, dst_memb->size);
}