summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2016-06-19 21:08:25 +0200
committerAilin Nemui <ailin@z30a.localdomain>2017-01-02 17:50:14 +0100
commit5eaead761f1812fb9d4058b2bc38468521794693 (patch)
treea0ea2c1990bedbcb91cb5cb267df3ceef48c31b7
parent3fcd3cd2b9fae07a0b7cd3e5ba91049f19cc6501 (diff)
downloadirssi-5eaead761f1812fb9d4058b2bc38468521794693.zip
Rebase against master.
-rw-r--r--src/core/ignore.c6
-rw-r--r--src/fe-text/textbuffer.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/core/ignore.c b/src/core/ignore.c
index 30cb7cb8..c91f6e4a 100644
--- a/src/core/ignore.c
+++ b/src/core/ignore.c
@@ -66,8 +66,10 @@ static int ignore_match_pattern(IGNORE_REC *rec, const char *text)
if (text == NULL)
return FALSE;
- if (rec->regexp)
- return rec->preg && g_regex_match(rec->preg, text, 0, NULL);
+ if (rec->regexp) {
+ return rec->preg != NULL &&
+ g_regex_match(rec->preg, text, 0, NULL);
+ }
return rec->fullword ?
stristr_full(text, rec->pattern) != NULL :
diff --git a/src/fe-text/textbuffer.c b/src/fe-text/textbuffer.c
index 7d0806d1..f35848a2 100644
--- a/src/fe-text/textbuffer.c
+++ b/src/fe-text/textbuffer.c
@@ -570,7 +570,7 @@ GList *textbuffer_find_text(TEXT_BUFFER_REC *buffer, LINE_REC *startline,
textbuffer_line2text(line, FALSE, str);
if (line_matched) {
- line_matched = regexp ?
+ line_matched = regexp ?
g_regex_match(preg, str->str, 0, NULL) :
match_func(str->str, text) != NULL;
}