diff options
author | Hugo van der Sanden <hv@crypt.org> | 2004-04-14 20:30:46 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-04-19 08:30:20 +0000 |
commit | 0e788c723acb32640922903142ad781f29abd676 (patch) | |
tree | 9402291fb644308ffc83cc592d0fe3a838879ee4 /regcomp.c | |
parent | 0e031069a800bb10c985d674c78cad16ac30f621 (diff) | |
download | perl-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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 */ |