From e5ad7d81fffc4a96e9112cf9bdec18b66ff735ce Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Fri, 24 Jan 2020 22:46:47 +0530 Subject: [PATCH] PCRE 2 - fix check for filter match Kind contribution from uno20001: https://old.reddit.com/r/C_Programming/comments/etavho/file_manager_nnn_needs_help_with_pcre/fffk4wr/ --- src/nnn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nnn.c b/src/nnn.c index eda623ce..039d88c7 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -1902,7 +1902,7 @@ static int setfilter(regex_t *regex, const char *filter) static int visible_re(const fltrexp_t *fltrexp, const char *fname) { #ifdef PCRE - return pcre_exec(fltrexp->pcrex, NULL, fname, strlen(fname), 0, 0, NULL, 0); + return pcre_exec(fltrexp->pcrex, NULL, fname, strlen(fname), 0, 0, NULL, 0) == 0; #else return regexec(fltrexp->regex, fname, 0, NULL, 0) == 0; #endif