diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2006-10-04 17:44:31 +1000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2006-10-04 17:44:31 +1000 |
commit | 1adfb341436bdde325d89e01a0b96ebc13d5856b (patch) | |
tree | 0dcf9d63c18d56671f7d73572c12316b23c14cb3 | |
parent | [BUILD] Added --with-libedit option to configure (diff) | |
download | dash-1adfb341436bdde325d89e01a0b96ebc13d5856b.tar.gz dash-1adfb341436bdde325d89e01a0b96ebc13d5856b.zip |
[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.
-rw-r--r-- | src/expand.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |