summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-01-05 13:21:57 -0700
committerKarl Williamson <public@khwilliamson.com>2012-01-13 09:58:37 -0700
commitdcf8909ac1f19ef2c4b6354bfe982913360e9041 (patch)
treed636a7ca36beb19f4a60f24d18d6cac0536fc7ba /regcomp.c
parentf1114c308f91facf2b7df703a40f0e1761a9968a (diff)
downloadperl-dcf8909ac1f19ef2c4b6354bfe982913360e9041.tar.gz
regcomp.c: in debug output, don't duplicate code points
The non-bitmap portion of an ANYOF node may also be in the bitmap portion. There is no sense in having duplicate output
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index 6904be8199..0c30210458 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -11938,7 +11938,13 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o)
for (i = 0; i <= 256; i++) { /* Look at chars in bitmap */
uvchr_to_utf8(s, i);
- if (i < 256 && swash_fetch(sw, s, TRUE)) {
+ if (i < 256
+ && ! ANYOF_BITMAP_TEST(o, i) /* Don't duplicate
+ things already
+ output as part
+ of the bitmap */
+ && swash_fetch(sw, s, TRUE))
+ {
if (rangestart == -1)
rangestart = i;
} else if (rangestart != -1) {