summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-10-04 17:44:31 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2006-10-04 17:44:31 +1000
commit1adfb341436bdde325d89e01a0b96ebc13d5856b (patch)
tree0dcf9d63c18d56671f7d73572c12316b23c14cb3 /src
parent[BUILD] Added --with-libedit option to configure (diff)
downloaddash-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.
Diffstat (limited to '')
-rw-r--r--src/expand.c2
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;
7 22:32:54 -0500'>2019-11-07Just write the example normallyJune McEnroe 2019-11-07Include path in readlinkat errorJune McEnroe 2019-11-07Call clientConsume before clientRecvJune McEnroe 2019-11-06Use -l:filename in Linux.mkJune McEnroe 2019-11-06Fix compat.h for #defined strlcpyJune McEnroe 2019-11-06Allow unsetting LIBRESSL_PREFIXJune McEnroe 2019-11-06Document calico service configurationJune McEnroe 2019-11-06Document SASL EXTERNAL configuration in more detailJune McEnroe 2019-11-06Document pounce service configurationJune McEnroe 2019-11-06Mention Darwin and GNU/Linux in READMEJune McEnroe 2019-11-06Assume LibreSSL from brew on DarwinJune McEnroe 2019-11-06Remove -DNO_EXPLICIT_BZERO from Darwin.mkJune McEnroe 2019-11-06Don't install rc scripts or dirs on LinuxJune McEnroe