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/
This commit is contained in:
Arun Prakash Jana 2020-01-24 22:46:47 +05:30
parent 196c09ab9b
commit e5ad7d81ff
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 1 additions and 1 deletions

View File

@ -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