Revision: 649
http://vcs.pcre.org/viewvc?view=rev&revision=649
Author: ph10
Date: 2011-08-01 12:23:52 +0100 (Mon, 01 Aug 2011)
Log Message:
-----------
Fix partial match bug with /f.*/8s.
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/pcre_exec.c
code/trunk/testdata/testinput2
code/trunk/testdata/testoutput2
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2011-08-01 11:02:08 UTC (rev 648)
+++ code/trunk/ChangeLog 2011-08-01 11:23:52 UTC (rev 649)
@@ -240,6 +240,10 @@
45. The pattern /.(*F)/, when applied to "abc" with PCRE_PARTIAL_HARD, gave a
partial match of an empty string instead of no match. This was specific to
the use of ".".
+
+46. The pattern /f.*/8s, when applied to "for" with PCRE_PARTIAL_HARD, gave a
+ complete match instead of a partial match. This bug was dependent on both
+ the PCRE_UTF8 and PCRE_DOTALL options being set.
Version 8.12 15-Jan-2011
Modified: code/trunk/pcre_exec.c
===================================================================
--- code/trunk/pcre_exec.c 2011-08-01 11:02:08 UTC (rev 648)
+++ code/trunk/pcre_exec.c 2011-08-01 11:23:52 UTC (rev 649)
@@ -5182,7 +5182,11 @@
while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
}
}
- else eptr = md->end_subject; /* Unlimited UTF-8 repeat */
+ else
+ {
+ eptr = md->end_subject; /* Unlimited UTF-8 repeat */
+ SCHECK_PARTIAL();
+ }
break;
/* The byte case is the same as non-UTF8 */
Modified: code/trunk/testdata/testinput2
===================================================================
--- code/trunk/testdata/testinput2 2011-08-01 11:02:08 UTC (rev 648)
+++ code/trunk/testdata/testinput2 2011-08-01 11:23:52 UTC (rev 649)
@@ -3837,4 +3837,16 @@
/.(*F)/
\P\Pabc
+/f.*/
+ \P\Pfor
+
+/f.*/s
+ \P\Pfor
+
+/f.*/8
+ \P\Pfor
+
+/f.*/8s
+ \P\Pfor
+
/-- End of testinput2 --/
Modified: code/trunk/testdata/testoutput2
===================================================================
--- code/trunk/testdata/testoutput2 2011-08-01 11:02:08 UTC (rev 648)
+++ code/trunk/testdata/testoutput2 2011-08-01 11:23:52 UTC (rev 649)
@@ -12217,4 +12217,20 @@
\P\Pabc
No match
+/f.*/
+ \P\Pfor
+Partial match: for
+
+/f.*/s
+ \P\Pfor
+Partial match: for
+
+/f.*/8
+ \P\Pfor
+Partial match: for
+
+/f.*/8s
+ \P\Pfor
+Partial match: for
+
/-- End of testinput2 --/