From 69a380c29ce4283ad6631888135347eb67adfe2e Mon Sep 17 00:00:00 2001 From: samr7 Date: Tue, 21 Aug 2012 13:54:14 -0700 Subject: [PATCH] Don't skip the last case-insensitive variant of each prefix. --- pattern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pattern.c b/pattern.c index c332d46..eace21f 100644 --- a/pattern.c +++ b/pattern.c @@ -1189,7 +1189,7 @@ prefix_case_iter_next(prefix_case_iter_t *cip) nbits = cip->ci_nbits; max = (1UL << nbits) - 1; val = cip->ci_value + 1; - if (val >= max) + if (val > max) return 0; for (i = 0, mask = 1; i < nbits; i++, mask <<= 1) {