aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2006-08-02 09:14:31 +0000
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2006-08-02 09:14:31 +0000
commit0669def03d2f3638b620982aee6f5fda84d6072f (patch)
treed3fe1ef83d1b90aa55d327ef510d2624039acdf1 /epan/proto.c
parent7b3b26fd394bb775174da17686ed024383443d98 (diff)
Fix for bug 1023 (problem with 'apply as filter' strings)
svn path=/trunk/; revision=18817
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 51cd35be86..1c94aa374f 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -5291,8 +5291,6 @@ proto_construct_dfilter_string(field_info *finfo, epan_dissect_t *edt)
break;
case FT_PROTOCOL:
- case FT_NONE:
- /* Just want to test for the presence of these */
buf = ep_strdup(finfo->hfinfo->abbrev);
break;
@@ -5322,13 +5320,18 @@ proto_construct_dfilter_string(field_info *finfo, epan_dissect_t *edt)
return NULL; /* you lose */
/*
- * If the length is 0, there's nothing to match, so
- * we can't match. (Also check for negative values,
+ * If the length is 0, just match the name of the field
+ * (Also check for negative values,
* just in case, as we'll cast it to an unsigned
* value later.)
*/
length = finfo->length;
- if (length <= 0)
+ if (length == 0)
+ {
+ buf = ep_strdup(finfo->hfinfo->abbrev);
+ break;
+ }
+ if (length < 0)
return NULL;
/*