diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2011-08-15 17:39:09 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2011-08-15 17:39:09 +0000 |
commit | 3e2bbc33036d0ee767f1c70431d99c98fcb96b3c (patch) | |
tree | 2c7dc0a2a952e53ad24a8861840a039fa14afddc /pcre_study.c | |
parent | e1a6406ad8d260675b576163174ed778ed871a6e (diff) | |
download | pcre-3e2bbc33036d0ee767f1c70431d99c98fcb96b3c.tar.gz |
Fix pcre_study() bug with \b at start of branch.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@657 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_study.c')
-rw-r--r-- | pcre_study.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pcre_study.c b/pcre_study.c index ed2efe5..a940535 100644 --- a/pcre_study.c +++ b/pcre_study.c @@ -773,7 +773,6 @@ do case OP_NOTUPTOI: case OP_NOT_HSPACE: case OP_NOT_VSPACE: - case OP_NOT_WORD_BOUNDARY: case OP_NRREF: case OP_PROP: case OP_PRUNE: @@ -791,10 +790,16 @@ do case OP_SOM: case OP_THEN: case OP_THEN_ARG: - case OP_WORD_BOUNDARY: case OP_XCLASS: return SSB_FAIL; + /* We can ignore word boundary tests. */ + + case OP_WORD_BOUNDARY: + case OP_NOT_WORD_BOUNDARY: + tcode++; + break; + /* If we hit a bracket or a positive lookahead assertion, recurse to set bits from within the subpattern. If it can't find anything, we have to give up. If it finds some mandatory character(s), we are done for this |