From 1adfb341436bdde325d89e01a0b96ebc13d5856b Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Wed, 4 Oct 2006 17:44:31 +1000 Subject: [EXPAND] Fixed inverted char class matching The return value of ccmatch was being treated as 0 or 1 but it's actually zero or non-zero. This broke inverted character class matching. Reported by Alexander Skwar. --- src/expand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/expand.c') diff --git a/src/expand.c b/src/expand.c index cf64921..db67c7c 100644 --- a/src/expand.c +++ b/src/expand.c @@ -1581,7 +1581,7 @@ pmatch(const char *pattern, const char *string) if (c == '[') { const char *r; - found |= ccmatch(p, chr, &r); + found |= !!ccmatch(p, chr, &r); if (r) { p = r; continue; -- cgit 1.4.1