aboutsummaryrefslogtreecommitdiff
path: root/libsylph
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2016-01-18 09:43:04 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2016-01-18 09:43:04 +0000
commitf6b65c6fd3997d8d1e087d4918c68e2eb585f07c (patch)
treeb9f73ab0100f12b084021b9bab63af59b687f2e4 /libsylph
parentadbdd017d532b5548190a815041bed5e5a60ed2f (diff)
fixed Oniguruma regex match again.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3504 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph')
-rw-r--r--libsylph/filter.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libsylph/filter.c b/libsylph/filter.c
index 1a3bb4ae..c58f8fc9 100644
--- a/libsylph/filter.c
+++ b/libsylph/filter.c
@@ -344,11 +344,15 @@ static gboolean strmatch_regex(const gchar *haystack, const gchar *needle)
size_t haystack_len;
ret = onig_new(&reg, ptn, ptn + strlen(needle),
- ONIG_OPTION_IGNORECASE|ONIG_OPTION_EXTEND,
+ /* ONIG_OPTION_EXTEND requires spaces to be escaped */
+ /* ONIG_OPTION_IGNORECASE|ONIG_OPTION_EXTEND, */
+ ONIG_OPTION_IGNORECASE,
ONIG_ENCODING_UTF8, ONIG_SYNTAX_POSIX_EXTENDED,
&err_info);
- if (ret != ONIG_NORMAL)
+ if (ret != ONIG_NORMAL) {
+ g_warning("strmatch_regex: onig_new() failed: %d", ret);
return FALSE;
+ }
haystack_len = strlen(haystack);
ret = onig_search(reg, str, str + haystack_len,