summaryrefslogtreecommitdiffstats
path: root/src/libutil/regexp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-28 13:32:26 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-28 13:32:26 +0000
commit3a995b7221266ab58f8b3fac8fb02e70c23c42a9 (patch)
tree59e62d57f0abee986ceb81829c806112e8505a2b /src/libutil/regexp.c
parent71499b6811fdd2df0ecc7581120b83a0935b1370 (diff)
downloadrspamd-3a995b7221266ab58f8b3fac8fb02e70c23c42a9.tar.gz
rspamd-3a995b7221266ab58f8b3fac8fb02e70c23c42a9.zip
[Minor] Store the fact that we have utf8 only regexps in corpus
Diffstat (limited to 'src/libutil/regexp.c')
-rw-r--r--src/libutil/regexp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libutil/regexp.c b/src/libutil/regexp.c
index a3246ae9f..4eb0361ec 100644
--- a/src/libutil/regexp.c
+++ b/src/libutil/regexp.c
@@ -379,6 +379,7 @@ rspamd_regexp_new (const gchar *pattern, const gchar *flags,
break;
case 'u':
rspamd_flags &= ~RSPAMD_REGEXP_FLAG_RAW;
+ rspamd_flags |= RSPAMD_REGEXP_FLAG_UTF;
#ifndef WITH_PCRE2
regexp_flags |= PCRE_FLAG(UTF8);
#else
@@ -392,6 +393,7 @@ rspamd_regexp_new (const gchar *pattern, const gchar *flags,
break;
case 'r':
rspamd_flags |= RSPAMD_REGEXP_FLAG_RAW;
+ rspamd_flags &= ~RSPAMD_REGEXP_FLAG_UTF;
#ifndef WITH_PCRE2
regexp_flags &= ~PCRE_FLAG(UTF8);
#else