diff options
author | Karl Williamson <public@khwilliamson.com> | 2010-12-07 15:21:55 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2010-12-11 15:57:53 -0700 |
commit | fed836b3bfd7f84c2054616037d002570c7f407c (patch) | |
tree | 16138e6360acfd079680157ade39604942d500ed /regcomp.c | |
parent | f1d6d3cd22e129a9bf34f86ebe89183aad01d216 (diff) | |
download | perl-fed836b3bfd7f84c2054616037d002570c7f407c.tar.gz |
regcomp.c: When inverting a [], adjust bit count
When one complements every bit, the count of those that are set should
be complemented as well.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -8933,6 +8933,9 @@ parseit: if ((ANYOF_FLAGS(ret) & ANYOF_FLAGS_ALL) == ANYOF_INVERT) { for (value = 0; value < ANYOF_BITMAP_SIZE; ++value) ANYOF_BITMAP(ret)[value] ^= 0xFF; + stored = 256 - stored; + + /* The inversion means that everything above 255 is matched */ ANYOF_FLAGS(ret) = ANYOF_UTF8|ANYOF_UNICODE_ALL; } |