From fd5795cc9890581b9783a0ff96e0b44d6b38e26a Mon Sep 17 00:00:00 2001 From: Wolfgang Jenkner Date: Thu, 22 May 2008 16:33:57 +0200 Subject: [PATCH] p_b_cclass found the wrong cclass, due to a logical glitch. E.g., it would find the cclass corresponding to [:alpha:] when searching for the [:alnum:] one. --- regex/regcomp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regex/regcomp.c b/regex/regcomp.c index b7509413..0b276aff 100644 --- a/regex/regcomp.c +++ b/regex/regcomp.c @@ -818,7 +818,7 @@ p_b_cclass(register struct parse *p, register cset *cs) NEXT(); len = p->next - sp; for (cp = cclasses; cp->name != NULL; cp++) - if (STRLEN(cp->name) == len && MEMCMP(cp->name, sp, len)) + if (STRLEN(cp->name) == len && !MEMCMP(cp->name, sp, len)) break; if (cp->name == NULL) { /* oops, didn't find it */ -- 2.11.4.GIT