diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2011-01-04 14:53:27 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2011-01-04 14:53:27 (GMT) |
commit | f5f8ea0729534ba99ee65d70ae83043245ae1216 (patch) | |
tree | a9caf810a6067ec559f700aee6d6f141b30f3f68 /tools | |
parent | 22ad8ccadd47847719791e62c9b092faaaa319db (diff) | |
download | hdf5-f5f8ea0729534ba99ee65d70ae83043245ae1216.zip hdf5-f5f8ea0729534ba99ee65d70ae83043245ae1216.tar.gz hdf5-f5f8ea0729534ba99ee65d70ae83043245ae1216.tar.bz2 |
[svn-r19903] Need to check if the length of mask is equal to the size of the mask and skip the shift.
Tested: local linux
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5dump/h5dump.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index d0e7341..937c869 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -3715,8 +3715,12 @@ parse_mask_list(const char *h_list) /* After packed_mask is calculated, packed_length is not needed but */ /* keep it for debug purpose. */ temp_mask = ~0L; - temp_mask = temp_mask << length_value; - packed_mask[packed_bits_num] = ~temp_mask; + if(length_value<8*sizeof(unsigned long long)) { + temp_mask = temp_mask << length_value; + packed_mask[packed_bits_num] = ~temp_mask; + } + else + packed_mask[packed_bits_num] = temp_mask; packed_bits_num++; /* skip a possible comma separator */ |