From 41b7272c0e10f27d5286e20bd11742314d6105db Mon Sep 17 00:00:00 2001 From: Ulf Lamping Date: Sat, 4 Jun 2005 21:39:36 +0000 Subject: [PATCH] fix #225-#231: the enum lmp_filter_keys contained holes, so the logic to detect the field type failed, resulting in the bug svn path=/trunk/; revision=14552 --- epan/dissectors/packet-lmp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/epan/dissectors/packet-lmp.c b/epan/dissectors/packet-lmp.c index 5ce749e0d4..2a44b57110 100644 --- a/epan/dissectors/packet-lmp.c +++ b/epan/dissectors/packet-lmp.c @@ -1025,7 +1025,10 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset+3, 1, message_type); proto_tree_add_text(lmp_header_tree, tvb, offset+4, 2, "Length: %d bytes", msg_length); - if (LMPF_MSG + message_type < LMPF_MSG_MAX && message_type > 0) { +/* if (LMPF_MSG + message_type < LMPF_MSG_MAX && message_type > 0) {*/ + /* this "if" is still a hack, but compared to the former one at least correct */ + if ((message_type >= LMPF_MSG_CONFIG && message_type <= LMPF_MSG_CHANNEL_STATUS_RESP) || + (message_type >= LMPF_MSG_SERVICE_CONFIG && message_type <= LMPF_MSG_SERVICE_CONFIG_NACK) ) { proto_tree_add_boolean_hidden(lmp_header_tree, lmp_filter[LMPF_MSG + message_type], tvb, offset+3, 1, 1); } else {