diff options
author | Stephen McCamant <smcc@mit.edu> | 2002-12-22 17:09:51 -0500 |
---|---|---|
committer | hv <hv@crypt.org> | 2003-01-03 11:11:09 +0000 |
commit | ed8d0fe2473523a42189f0c3b912e68bf4ca9b1b (patch) | |
tree | 75be74d0619981add2396efd75c92bc4a8545079 /pp_ctl.c | |
parent | d9d18af660f47fb8e7eedfe8204daab3270e514f (diff) | |
download | perl-ed8d0fe2473523a42189f0c3b912e68bf4ca9b1b.tar.gz |
Re: [perl #19061] 'goto' confuses 'redo'
Message-ID: <15878.32383.94274.950128@syllepsis.MIT.EDU>
p4raw-id: //depot/perl@18411
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -2048,11 +2048,15 @@ S_dofindlabel(pTHX_ OP *o, char *label, OP **opstack, OP **oplimit) for (kid = cUNOPo->op_first; kid; kid = kid->op_sibling) { if (kid == PL_lastgotoprobe) continue; - if ((kid->op_type == OP_NEXTSTATE || kid->op_type == OP_DBSTATE) && - (ops == opstack || - (ops[-1]->op_type != OP_NEXTSTATE && - ops[-1]->op_type != OP_DBSTATE))) - *ops++ = kid; + if (kid->op_type == OP_NEXTSTATE || kid->op_type == OP_DBSTATE) { + if (ops == opstack) + *ops++ = kid; + else if (ops[-1]->op_type == OP_NEXTSTATE || + ops[-1]->op_type == OP_DBSTATE) + ops[-1] = kid; + else + *ops++ = kid; + } if ((o = dofindlabel(kid, label, ops, oplimit))) return o; } |