ap

An audio player suited to my tastes
Log | Files | Refs | README | LICENSE

commit 9d631531184e3604b269b451ac0f292eace57458
parent 73b28b65270c6f0c269da7f0c2bfb5da9690b848
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Wed, 14 Jul 2021 03:05:23 -0700

Fix aps multimatch function

It was only returning a match if every pattern matched when it
should have if only a single pattern matched (or none were given).

Diffstat:
Maps/match.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/aps/match.c b/aps/match.c @@ -30,7 +30,7 @@ multimatch(char *s, char **patterns, unsigned int len) int i; for (i = 0; i < len; ++i) - if (!match(s, patterns[i])) - return 0; - return 1; + if (match(s, patterns[i])) + return 1; + return len == 0 ? 1 : 0; }