ieee80211: fixes min and max power values in item text (they are signed).
authorAdrian Granados <adrian@adriangranados.com>
Mon, 9 Apr 2018 20:21:27 +0000 (16:21 -0400)
committerGuy Harris <guy@alum.mit.edu>
Mon, 9 Apr 2018 21:56:18 +0000 (21:56 +0000)
This change further extends the fix for bug 14593 by making sure the
values min, max values shown in the item's info text match the
item's children values.

Change-Id: Ibac39e1f21a892a02753c3cf1604ed3b14eadc52
Reviewed-on: https://code.wireshark.org/review/26832
Reviewed-by: Guy Harris <guy@alum.mit.edu>
epan/dissectors/packet-ieee80211.c

index 2cb0de3f0e335ded2d0033b8a2f7a684633fad51..1a1f53add8739b8dc0d2047259d261664b6291dc 100644 (file)
@@ -16462,11 +16462,11 @@ ieee80211_tag_power_capability(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
   }
 
   proto_tree_add_item(tree, hf_ieee80211_tag_power_capability_min, tvb, offset, 1, ENC_LITTLE_ENDIAN);
-  proto_item_append_text(field_data->item_tag, " Min: %d", tvb_get_guint8(tvb, offset));
+  proto_item_append_text(field_data->item_tag, " Min: %d", (gint8)tvb_get_guint8(tvb, offset));
   offset += 1;
 
   proto_tree_add_item(tree, hf_ieee80211_tag_power_capability_max, tvb, offset, 1, ENC_LITTLE_ENDIAN);
-  proto_item_append_text(field_data->item_tag, ", Max :%d", tvb_get_guint8(tvb, offset));
+  proto_item_append_text(field_data->item_tag, ", Max: %d", (gint8)tvb_get_guint8(tvb, offset));
   return tvb_captured_length(tvb);
 }