diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-10-24 01:15:59 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-10-24 08:17:09 +0000 |
commit | c786aa56ad32cd820378756feff275b48ecb51a7 (patch) | |
tree | 5cf7970dd05c499f6c2db78ffb671245cef423c5 /epan/dfilter | |
parent | 681b97a047fa10c050a86869e113f8ecb3f9d127 (diff) |
Fix a copy-and-pasteo.
Fix the handling of the case of a "matches" operator with a field and a
character constant as operands.
Change-Id: I6451cee907d8486db96937173d0098de91ce7956
Reviewed-on: https://code.wireshark.org/review/18424
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dfilter')
-rw-r--r-- | epan/dfilter/semcheck.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dfilter/semcheck.c b/epan/dfilter/semcheck.c index 8d2840e0a9..515e48ebf4 100644 --- a/epan/dfilter/semcheck.c +++ b/epan/dfilter/semcheck.c @@ -1115,11 +1115,11 @@ check_relation_LHS_RANGE(dfwork_t *dfw, const char *relation_string, if (strcmp(relation_string, "matches") == 0) { /* Convert to a FT_PCRE */ fvalue = dfilter_fvalue_from_unparsed(dfw, FT_PCRE, s, FALSE); + } else { + /* The RHS should be FT_BYTES, but a character is just a + * one-byte byte string. */ + fvalue = charconst_to_bytes(dfw, s, allow_partial_value); } - - /* The RHS should be FT_BYTES, but a character is just a - * one-byte byte string. */ - fvalue = charconst_to_bytes(dfw, s, allow_partial_value); if (!fvalue) { DebugLog((" 5 check_relation_LHS_RANGE(type2 = STTYPE_UNPARSED): Could not convert from string!\n")); THROW(TypeError); |