diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2012-03-12 17:18:04 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2012-03-12 17:18:04 +0000 |
commit | da8cd5d5bd45612b38a470c7392856deda659365 (patch) | |
tree | 240151145f0e615dd09a5c1448abcec6c21d711a /epan/proto.c | |
parent | 35bf2e961940d6d173f84bb736262678a870c8b5 (diff) |
Value can't be negative if no_of_bits == 0
svn path=/trunk/; revision=41507
Diffstat (limited to 'epan/proto.c')
-rw-r--r-- | epan/proto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/proto.c b/epan/proto.c index 8374697621..95dfcf86b8 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -7440,7 +7440,7 @@ proto_tree_add_split_bits_item_ret_val(proto_tree *tree, const int hf_index, tvb case FT_INT24: case FT_INT32: case FT_INT64: - if (value & (G_GINT64_CONSTANT(1) << (no_of_bits-1))) + if (value & no_of_bits && (G_GINT64_CONSTANT(1) << (no_of_bits-1))) value |= (G_GINT64_CONSTANT(-1) << no_of_bits); break; default: |