summaryrefslogtreecommitdiff
path: root/pcre_exec.c
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2013-11-11 18:33:23 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2013-11-11 18:33:23 +0000
commitbedf8543fca9244a642da63b60e662d754216085 (patch)
tree9fbb7285f6141b41e33d9c6750421dba126f1029 /pcre_exec.c
parentb79cc767bf7081781e78955af3c986c2119bcdd3 (diff)
downloadpcre-bedf8543fca9244a642da63b60e662d754216085.tar.gz
Fix \K bug in possessively repeated groups.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1397 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_exec.c')
-rw-r--r--pcre_exec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pcre_exec.c b/pcre_exec.c
index 2470ee9..48aac2b 100644
--- a/pcre_exec.c
+++ b/pcre_exec.c
@@ -1173,6 +1173,7 @@ for (;;)
ecode = md->start_code + code_offset;
save_capture_last = md->capture_last;
matched_once = TRUE;
+ mstart = md->start_match_ptr; /* In case \K changed it */
continue;
}
@@ -1245,6 +1246,7 @@ for (;;)
eptr = md->end_match_ptr;
ecode = md->start_code + code_offset;
matched_once = TRUE;
+ mstart = md->start_match_ptr; /* In case \K reset it */
continue;
}
@@ -2007,6 +2009,7 @@ for (;;)
if (*ecode == OP_KETRPOS)
{
+ md->start_match_ptr = mstart; /* In case \K reset it */
md->end_match_ptr = eptr;
md->end_offset_top = offset_top;
RRETURN(MATCH_KETRPOS);