Convert the result of tvb_get_guint8 to (gint8) so that the display
authorjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 20 Jul 2005 15:08:29 +0000 (15:08 +0000)
committerjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 20 Jul 2005 15:08:29 +0000 (15:08 +0000)
as FT_INT32 shows a negative number if appropriate.

Is there a better way to solve this?
Does this problem occur in other places too?

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14970 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-radiotap.c

index b84f0dc847b58425da130abbcefbfc5f9dabe1b2..150d0d99e89eb6c72d7b9ff7e5a748f5cef80854 100644 (file)
@@ -370,7 +370,7 @@ dissect_radiotap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
            }
            if (tree) {
                proto_tree_add_int(radiotap_tree, hf_radiotap_antsignal,
-                                  tvb, offset, 1, tvb_get_guint8(tvb, offset));
+                                  tvb, offset, 1, (gint8) tvb_get_guint8(tvb, offset));
            }
            offset++;
            break;
@@ -379,7 +379,7 @@ dissect_radiotap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
            /* XXX distinguish units */
            if (tree) {
                proto_tree_add_int(radiotap_tree, hf_radiotap_antnoise,
-                                  tvb, offset, 1, tvb_get_guint8(tvb, offset));
+                                  tvb, offset, 1, (gint8) tvb_get_guint8(tvb, offset));
            }
            offset++;
            break;