diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-01-05 13:21:57 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-01-13 09:58:37 -0700 |
commit | dcf8909ac1f19ef2c4b6354bfe982913360e9041 (patch) | |
tree | d636a7ca36beb19f4a60f24d18d6cac0536fc7ba /regcomp.c | |
parent | f1114c308f91facf2b7df703a40f0e1761a9968a (diff) | |
download | perl-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.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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) { |