We missed to do this if PM_NO_PATTERN_MATCHES_EVERYTHING is set.
name = (char *)name_obj.data;
if ((!name || !*name) && (pmd->pm_flags & PM_SKIP_EMPTY_NAME))
return 1;
- if (!pmd->patterns.size && (pmd->pm_flags & PM_NO_PATTERN_MATCHES_EVERYTHING))
+ if (pmd->patterns.size == 0 &&
+ (pmd->pm_flags & PM_NO_PATTERN_MATCHES_EVERYTHING)) {
+ pmd->num_matches++;
return pmd->action(pmd->table, row, name, pmd->data);
+ }
for (p = pattern_txt; p < pattern_txt + pmd->patterns.size;
p += strlen(p) + 1) {
ret = fnmatch(p, name, pmd->fnmatch_flags);