diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2020-12-05 10:38:39 +0200 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2020-12-05 11:42:54 +0200 |
| commit | 3010e614a3da989b9a5d0b6196b02aa81e42ed47 (patch) | |
| tree | 5b554987b20e22fb576af70fae3d064721df5beb | |
| parent | e9529c246cd0175427eb99c96cbeeebd8305499e (diff) | |
parser: using correct field for regexp expansion
Fixes: #1848
| -rw-r--r-- | lib/mu-parser.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mu-parser.cc b/lib/mu-parser.cc index 3d9622d..1d05d13 100644 --- a/lib/mu-parser.cc +++ b/lib/mu-parser.cc @@ -212,7 +212,7 @@ Parser::Private::process_regex (const std::string& field, const std::regex& rx) if (id == MU_MSG_FIELD_ID_NONE) return {}; - char pfx[] = { mu_msg_field_xapian_prefix(id), '\0' }; + char pfx[] = { mu_msg_field_shortcut(id), '\0' }; std::vector<std::string> terms; store_.for_each_term(pfx,[&](auto&& str){ @@ -347,7 +347,7 @@ Parser::Private::data (Mu::Tokens& tokens, WarningVec& warnings) const } // does it look like a regexp? - if (val.length() >=2 ) + if (val.length() >= 2) if (val[0] == '/' && val[val.length()-1] == '/') return regex (fields, val, token.pos, warnings); |
