aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-01-24 22:46:47 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-01-24 22:46:47 +0530
commite5ad7d81fffc4a96e9112cf9bdec18b66ff735ce (patch)
treee78f0c0017be89acc75e5f2df3a696a0f59a37c2
parent196c09ab9b3c0da940f863425c37046d9ca21a2f (diff)
downloadnnn-e5ad7d81fffc4a96e9112cf9bdec18b66ff735ce.tar.gz
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/
-rw-r--r--src/nnn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nnn.c b/src/nnn.c
index eda623c..039d88c 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