This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
rpeep: maintain chain when del extra nextstates
[perl5.git] / op.c
diff --git a/op.c b/op.c
index bc6263b..07a9121 100644 (file)
--- a/op.c
+++ b/op.c
@@ -13448,9 +13448,10 @@ Perl_rpeep(pTHX_ OP *o)
                    op_null(o);
                    if (oldop)
                        oldop->op_next = nextop;
+                    o = nextop;
                    /* Skip (old)oldop assignment since the current oldop's
                       op_next already points to the next op.  */
-                   continue;
+                   goto redo;
                }
            }
            break;