aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-04-28 22:21:09 +0000
committerGuy Harris <guy@alum.mit.edu>2002-04-28 22:21:09 +0000
commit4fb36a6b1d6f914e734424b7444192caba15827b (patch)
tree029b08138eda69600cb1cd8e34507a82820ab95c
parent091e8dde2ada81ba6aa7cc2bb552cbdcf2e9a82a (diff)
Use "format_text()" when setting the display representation of string
values, so that non-printable characters are shown as escapes. svn path=/trunk/; revision=5280
-rw-r--r--epan/proto.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 9b88b71bf1..80fb1ad7a6 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -1,7 +1,7 @@
/* proto.c
* Routines for protocol tree
*
- * $Id: proto.c,v 1.64 2002/04/20 08:07:56 guy Exp $
+ * $Id: proto.c,v 1.65 2002/04/28 22:21:09 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -2262,8 +2262,10 @@ proto_item_fill_label(field_info *fi, gchar *label_str)
case FT_STRING:
case FT_STRINGZ:
case FT_UINT_STRING:
+ bytes = fvalue_get(fi->value);
snprintf(label_str, ITEM_LABEL_LENGTH,
- "%s: %s", hfinfo->name, (char*) fvalue_get(fi->value));
+ "%s: %s", hfinfo->name,
+ format_text(bytes, strlen(bytes)));
break;
default: