diff options
author | zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2011-11-28 20:39:30 +0000 |
---|---|---|
committer | zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2011-11-28 20:39:30 +0000 |
commit | 00cc776fe74e502bc0774ceca2bb3f11283e189a (patch) | |
tree | 1f19206b0bbf8f9f4d2af9a8a34d0198c8a70808 /pcre_xclass.c | |
parent | 4d715f1b6035e095635067d977ad56948ff4e4c2 (diff) | |
download | pcre-00cc776fe74e502bc0774ceca2bb3f11283e189a.tar.gz |
Make character ranges 16 bit friendly
git-svn-id: svn://vcs.exim.org/pcre/code/branches/pcre16@770 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_xclass.c')
-rw-r--r-- | pcre_xclass.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pcre_xclass.c b/pcre_xclass.c index 024d71d..cdb9d07 100644 --- a/pcre_xclass.c +++ b/pcre_xclass.c @@ -75,15 +75,16 @@ additional data. */ if (c < 256) { - if ((*data & XCL_MAP) != 0 && (data[1 + c/8] & (1 << (c&7))) != 0) - return !negated; /* char found */ + if ((*data & XCL_MAP) != 0 && + (((pcre_uint8 *)(data + 1))[c/8] & (1 << (c&7))) != 0) + return !negated; /* char found */ } /* First skip the bit map if present. Then match against the list of Unicode properties or large chars or ranges that end with a large char. We won't ever encounter XCL_PROP or XCL_NOTPROP when UCP support is not compiled. */ -if ((*data++ & XCL_MAP) != 0) data += 32; +if ((*data++ & XCL_MAP) != 0) data += 32 / sizeof(pcre_uchar); while ((t = *data++) != XCL_END) { |