aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-10-30 16:06:24 -0700
committerGuy Harris <guy@alum.mit.edu>2016-10-30 23:06:54 +0000
commit45a023f3d0f616d518a1eb0b08b68c109def3616 (patch)
treea5c113486c3b14428349128fdd21de8ec76d20db /epan/proto.c
parent03c6937e62b9b35960b65d573399d64b7a8fd147 (diff)
Don't use proto_tree_add_{uint,uint64}() to add signed integer values.
Change-Id: I8c5506b746f16e5b79d024be5594cb71f95eced1 Reviewed-on: https://code.wireshark.org/review/18584 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 60c1a2ffa8..54e8c8d178 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -9325,28 +9325,33 @@ proto_item_add_bitmask_tree(proto_item *item, tvbuff_t *tvb, const int offset,
switch (hf->type) {
case FT_CHAR:
- case FT_INT8:
case FT_UINT8:
- case FT_INT16:
case FT_UINT16:
- case FT_INT24:
case FT_UINT24:
- case FT_INT32:
case FT_UINT32:
proto_tree_add_uint(tree, **fields, tvb, offset, len, (guint32)value);
break;
- case FT_INT40:
+ case FT_INT8:
+ case FT_INT16:
+ case FT_INT24:
+ case FT_INT32:
+ proto_tree_add_int(tree, **fields, tvb, offset, len, (gint32)value);
+ break;
+
case FT_UINT40:
- case FT_INT48:
case FT_UINT48:
- case FT_INT56:
case FT_UINT56:
- case FT_INT64:
case FT_UINT64:
proto_tree_add_uint64(tree, **fields, tvb, offset, len, value);
break;
+ case FT_INT40:
+ case FT_INT48:
+ case FT_INT56:
+ case FT_INT64:
+ proto_tree_add_int64(tree, **fields, tvb, offset, len, (gint64)value);
+
case FT_BOOLEAN:
proto_tree_add_boolean64(tree, **fields, tvb, offset, len, value);
break;