summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2004-04-14 20:30:46 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-04-19 08:30:20 +0000
commit0e788c723acb32640922903142ad781f29abd676 (patch)
tree9402291fb644308ffc83cc592d0fe3a838879ee4 /regcomp.c
parent0e031069a800bb10c985d674c78cad16ac30f621 (diff)
downloadperl-0e788c723acb32640922903142ad781f29abd676.tar.gz
Re: [perl #28532] optional match of an anchor gets ignored
Message-Id: <200404141830.i3EIUko03728@zen.crypt.org> p4raw-id: //depot/perl@22712
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index 6293ade0e2..68fe68ce46 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -1188,7 +1188,9 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap, reg
if ( OP(oscan) == CURLYX && data
&& !(data->flags & SF_HAS_PAR)
&& !(data->flags & SF_HAS_EVAL)
- && !deltanext ) {
+ && !deltanext /* atom is fixed width */
+ && minnext != 0 /* CURLYM can't handle zero width */
+ ) {
/* XXXX How to optimize if data == 0? */
/* Optimize to a simpler form. */
regnode *nxt = NEXTOPER(oscan) + EXTRA_STEP_2ARGS; /* OPEN */