diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2005-01-21 20:52:21 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2005-01-21 20:52:21 (GMT) |
commit | cfb095ae9ce9d59eb5fbf407d60b5308fef67ba5 (patch) | |
tree | a4aa26b05cddfba9ce2b3baba9ae27fee3381341 /src/H5T.c | |
parent | 2cd3b4c609eb07baaa0f795983fd2ac85a7d9579 (diff) | |
download | hdf5-cfb095ae9ce9d59eb5fbf407d60b5308fef67ba5.zip hdf5-cfb095ae9ce9d59eb5fbf407d60b5308fef67ba5.tar.gz hdf5-cfb095ae9ce9d59eb5fbf407d60b5308fef67ba5.tar.bz2 |
[svn-r9856] Purpose: New test and minor bug fix
Description: Fixed a bug related to user-define functions for derived floating-point data type, like
H5Tset_fields, H5Tset_offset, H5Tset_precision, H5Tset_size. Added test for these functions and test
for data type conversion between derived floating-point types.
Platforms tested: h5committest and fuss
Diffstat (limited to 'src/H5T.c')
-rw-r--r-- | src/H5T.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -3412,9 +3412,9 @@ H5T_set_size(H5T_t *dt, size_t size) * The sign, mantissa, and exponent fields should be adjusted * first when decreasing the size of a floating point type. */ - if (dt->shared->u.atomic.u.f.sign >= prec || - dt->shared->u.atomic.u.f.epos + dt->shared->u.atomic.u.f.esize > prec || - dt->shared->u.atomic.u.f.mpos + dt->shared->u.atomic.u.f.msize > prec) { + if (dt->shared->u.atomic.u.f.sign >= prec+offset || + dt->shared->u.atomic.u.f.epos + dt->shared->u.atomic.u.f.esize > prec+offset || + dt->shared->u.atomic.u.f.mpos + dt->shared->u.atomic.u.f.msize > prec+offset) { HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "adjust sign, mantissa, and exponent fields first"); } break; |