diff options
author | Sake Blok <sake@euronet.nl> | 2008-01-22 00:56:55 +0000 |
---|---|---|
committer | Sake Blok <sake@euronet.nl> | 2008-01-22 00:56:55 +0000 |
commit | 531879ad82dd0aa7c8e87440a05716311fa42c2d (patch) | |
tree | 59a9647eb6e6bcf82a03309bcbe6323ebb607ea5 /print.c | |
parent | 0ba5581dd871eb07d210823bd37d77ee54fcfabf (diff) | |
download | wireshark-531879ad82dd0aa7c8e87440a05716311fa42c2d.tar.gz wireshark-531879ad82dd0aa7c8e87440a05716311fa42c2d.tar.bz2 wireshark-531879ad82dd0aa7c8e87440a05716311fa42c2d.zip |
When using -T fields, print a "1" instead of nothing when a field of type FT_NONE is
present. This way, scripts can check for the presence of this type of fields.
(fixes bug 2210)
svn path=/trunk/; revision=24158
Diffstat (limited to 'print.c')
-rw-r--r-- | print.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1452,7 +1452,9 @@ static const gchar* get_node_field_value(field_info* fi, epan_dissect_t* edt) return fi->hfinfo->abbrev;; } case FT_NONE: - return NULL; + /* Return "1" so that the presence of a field of type + * FT_NONE can be checked when using -T fields */ + return "1"; default: /* XXX - this is a hack until we can just call * fvalue_to_string_repr() for *all* FT_* types. */ |