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
This commit is contained in:
Ulf Lamping 2005-06-04 21:39:36 +00:00
parent a547ad95eb
commit 41b7272c0e
1 changed files with 4 additions and 1 deletions

View File

@ -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 {