Change 17787 by [EMAIL PROTECTED] on 2002/08/26 19:22:27
fix for:
Subject: [perl #16773] "abc" =~ /(ab)()(c)??/ broken
From: (Randal L. Schwartz) (via RT) <[EMAIL PROTECTED]>
Date: 26 Aug 2002 15:01:36 -0000
Message-Id: <[EMAIL PROTECTED]>
Affected files ...
.... //depot/perl/regexec.c#290 edit
.... //depot/perl/t/op/re_tests#78 edit
Differences ...
==== //depot/perl/regexec.c#290 (text) ====
Index: perl/regexec.c
--- perl/regexec.c#289~17541~ Sun Jul 14 20:31:05 2002
+++ perl/regexec.c Mon Aug 26 12:22:27 2002
@@ -3682,14 +3682,14 @@
/* If it could work, try it. */
if (c == (UV)c1 || c == (UV)c2)
{
- TRYPAREN(paren, n, PL_reginput);
+ TRYPAREN(paren, ln, PL_reginput);
REGCP_UNWIND(lastcp);
}
}
/* If it could work, try it. */
else if (c1 == -1000)
{
- TRYPAREN(paren, n, PL_reginput);
+ TRYPAREN(paren, ln, PL_reginput);
REGCP_UNWIND(lastcp);
}
/* Couldn't or didn't -- move forward. */
==== //depot/perl/t/op/re_tests#78 (text) ====
Index: perl/t/op/re_tests
--- perl/t/op/re_tests#77~17541~ Sun Jul 14 20:31:05 2002
+++ perl/t/op/re_tests Mon Aug 26 12:22:27 2002
@@ -922,3 +922,4 @@
(.*?)(?<=[bc])c abcd y $1 ab
2(]*)?$\1 2 y $& 2
(??{}) x y - -
+a(b)?? abc y <$1> <> # undef [perl #16773]
End of Patch.