summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1999-06-07 20:20:32 (GMT)
committerRobb Matzke <matzke@llnl.gov>1999-06-07 20:20:32 (GMT)
commit58eb9c4aa043151cf9ec77b46afb162988cc1d42 (patch)
tree19282b5d416b04a480bbcec3fd28555c7e794e01 /src/H5Tconv.c
parent8532eb342ec94f6f7c92c73108c37228c91ee31c (diff)
downloadhdf5-58eb9c4aa043151cf9ec77b46afb162988cc1d42.zip
hdf5-58eb9c4aa043151cf9ec77b46afb162988cc1d42.tar.gz
hdf5-58eb9c4aa043151cf9ec77b46afb162988cc1d42.tar.bz2
[svn-r1311] Changes since 19990607
---------------------- ./tools/h5ls.c ./tools/h5tools.c Added support for printing bitfields and opaque data. ./test/dsets.c Added bitfield and opaque datasets to the output file so h5ls has something interesting to print. ./test/trefer.c Resync'd ./src/H5Tconv.c Fixed bitfield conversion which resulted in possible garbage in high-order bits of destination when the destination type is larger than the source type. Thanks for spotting it, Quincey.
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 5a84ad1..3d6bcca 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -628,7 +628,7 @@ H5T_conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/*
* Copy the significant part of the value. If the source is larger
* than the destination then invoke the overflow function or copy
- * as many bits as possible.
+ * as many bits as possible. Zero extra bits in the destination.
*/
if (src->u.atomic.prec>dst->u.atomic.prec) {
if (!H5T_overflow_g ||
@@ -640,6 +640,8 @@ H5T_conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
H5T_bit_copy(d, dst->u.atomic.offset,
s, src->u.atomic.offset,
src->u.atomic.prec);
+ H5T_bit_set(d, dst->u.atomic.offset+src->u.atomic.prec,
+ dst->u.atomic.prec-src->u.atomic.prec, FALSE);
}
/*