Fix val_to_str() call.

The format argument (third argument) is used with the numerical value
passed to val_to_str(), so it should have a numerical format item, not a
string format item.

Bug: 16146
Change-Id: I91ae0edd7fe06fb95ae74697b06bd4f50b696f9f
Reviewed-on: https://code.wireshark.org/review/34866
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2019-10-27 12:50:25 -07:00
parent 4c67990296
commit 73ac329193
1 changed files with 1 additions and 1 deletions

View File

@ -1987,7 +1987,7 @@ dissect_attr_element_container(proto_tree* attr_tree, tvbuff_t* tvb, gint offset
{
guint element_id = tvb_get_guint8(tvb, sub_offset);
guint element_len = tvb_get_guint8(tvb, sub_offset + 1);
const char* msg = val_to_str(element_id, ie_tag_num_vals, "%s");
const char* msg = val_to_str(element_id, ie_tag_num_vals, "Unknown element ID (%u)");
sub_tree = proto_tree_add_subtree(attr_tree, tvb, sub_offset, element_len + 2, ett_ie_tree, NULL, msg);
proto_tree_add_item(sub_tree, hf_nan_attr_container_element_id, tvb, sub_offset, 1, ENC_BIG_ENDIAN);