summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2010-11-02 14:24:20 +0100
committerYves Orton <demerphq@gmail.com>2010-11-03 10:24:41 +0100
commit20dbff7c228c031beedfe10ca09e8547f7cd3f2f (patch)
tree72d28e334162dee315eb6bc7d2b558397f6a2fe0
parent8ff3250783a482c6a5b949510ec0926e865d25ad (diff)
downloadperl-20dbff7c228c031beedfe10ca09e8547f7cd3f2f.tar.gz
fix the trie part of rt-78356
When the jump code was added the case of an empty string followed by a jump wasnt accounted for. One could argue it should not happen however that is a matter for a different commit.
-rw-r--r--regexec.c3
-rw-r--r--t/re/re_tests1
2 files changed, 3 insertions, 1 deletions
diff --git a/regexec.c b/regexec.c
index 2e15b45778..7e479a33c0 100644
--- a/regexec.c
+++ b/regexec.c
@@ -3223,7 +3223,8 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
"%*s %smatched empty string...%s\n",
REPORT_CODE_OFF+depth*2, "", PL_colors[4], PL_colors[5])
);
- break;
+ if (!trie->jump)
+ break;
} else {
DEBUG_EXECUTE_r(
PerlIO_printf(Perl_debug_log,
diff --git a/t/re/re_tests b/t/re/re_tests
index 1c45583f43..66a47cc948 100644
--- a/t/re/re_tests
+++ b/t/re/re_tests
@@ -1482,4 +1482,5 @@ abc\N{def - c - \\N{NAME} must be resolved by the lexer
[\0005] 5\000 y $& 5
[\_] _ y $& _
+(?:(?:)foo|bar|zot|rt78356) foo y $& foo
# vim: softtabstop=0 noexpandtab