summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXiaowen Wu <wuxiaowe@ncsa.uiuc.edu>2005-04-29 20:19:49 (GMT)
committerXiaowen Wu <wuxiaowe@ncsa.uiuc.edu>2005-04-29 20:19:49 (GMT)
commitabe7368338f5700025b24dc14be377ca024b68a1 (patch)
treefb794d92b63ca2a146aa2b3ccc7b9f6c6df967ba /src
parentbceba07ad22bdac386fe6ee7f6b225d2cf5bff42 (diff)
downloadhdf5-abe7368338f5700025b24dc14be377ca024b68a1.zip
hdf5-abe7368338f5700025b24dc14be377ca024b68a1.tar.gz
hdf5-abe7368338f5700025b24dc14be377ca024b68a1.tar.bz2
[svn-r10698] Purpose:
Bug fix. Description: The scaleoffset filter checks the uppper limmit of span of values before it is assigned. The check for floating-point data, which may not be represented in the machine exactly as the user wanted, did not consider this. Solution: Slight modification of check above. Platforms tested: heping Misc. update:
Diffstat (limited to 'src')
-rw-r--r--src/H5Zscaleoffset.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c
index b8f698b..3dfd7ac 100644
--- a/src/H5Zscaleoffset.c
+++ b/src/H5Zscaleoffset.c
@@ -290,17 +290,17 @@ H5Z_class_t H5Z_SCALEOFFSET[1] = {{
{ \
if(sizeof(type)==sizeof(int)) { \
if(H5Z_scaleoffset_rnd(max*HDpow(10, D_val) - min*HDpow(10, D_val)) \
- > ~(unsigned int)0 - 2) { \
+ >= ~(unsigned int)0 - 2) { \
*minbits = sizeof(int)*8; goto done; \
} \
} else if(sizeof(type)==sizeof(long)) { \
if(H5Z_scaleoffset_rnd(max*HDpow(10, D_val) - min*HDpow(10, D_val)) \
- > ~(unsigned long)0 - 2) { \
+ >= ~(unsigned long)0 - 2) { \
*minbits = sizeof(long)*8; goto done; \
} \
} else if(sizeof(type)==sizeof(long_long)) { \
if(H5Z_scaleoffset_rnd(max*HDpow(10, D_val) - min*HDpow(10, D_val)) \
- > ~(unsigned long_long)0 - 2) { \
+ >= ~(unsigned long_long)0 - 2) { \
*minbits = sizeof(long_long)*8; goto done; \
} \
} else \