aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tzsp.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2005-03-17 05:14:01 +0000
committerGerald Combs <gerald@wireshark.org>2005-03-17 05:14:01 +0000
commitfd61f72cb7cb222aabf219eca43b803210c295ca (patch)
tree6fed81efd6124d530bacc9ecd4256789ebae8471 /epan/dissectors/packet-tzsp.c
parent61c7ec6534777e373f99633d2788443f9f97dab9 (diff)
Use val_to_str instead of indexing a value_string directly. This keeps us
from crashing when we encounter an invalid type value. svn path=/trunk/; revision=13790
Diffstat (limited to 'epan/dissectors/packet-tzsp.c')
-rw-r--r--epan/dissectors/packet-tzsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-tzsp.c b/epan/dissectors/packet-tzsp.c
index 5c0325d3b4..f95b35d4c3 100644
--- a/epan/dissectors/packet-tzsp.c
+++ b/epan/dissectors/packet-tzsp.c
@@ -312,7 +312,7 @@ dissect_tzsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
else {
wtap_encap = -1;
encap_name = "Nothing";
- info = tzsp_type[type].strptr;
+ info = val_to_str(type, tzsp_type, "Unknown (%u)");
}
if (check_col(pinfo->cinfo, COL_INFO))