This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #119043] Exempt shared hash key consts from ro
[perl5.git] / pp_ctl.c
index 5c6999b..ff3d661 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -226,15 +226,10 @@ PP(pp_substcont)
        if (SvTAINTED(TOPs))
            cx->sb_rxtainted |= SUBST_TAINT_REPL;
        sv_catsv_nomg(dstr, POPs);
-        /* XXX: the RX_GOFS stuff is to adjust for positive offsets of
-         * \G for instance s/(.)\G//g with positive pos(). See #69056 and #114884
-         * This whole \G thing makes a *lot* of things more difficult than they
-         * should be. - Yves */
-       /* Are we done */
        if (CxONCE(cx) || s < orig ||
-                !CALLREGEXEC(rx, s - RX_GOFS(rx), cx->sb_strend, orig,
-                            (s == m) + RX_GOFS(rx), cx->sb_targ, NULL,
-                                (REXEC_IGNOREPOS|REXEC_NOT_FIRST)))
+                !CALLREGEXEC(rx, s, cx->sb_strend, orig,
+                            (s == m), cx->sb_targ, NULL,
+                    (REXEC_IGNOREPOS|REXEC_NOT_FIRST|REXEC_FAIL_ON_UNDERFLOW)))
        {
            SV *targ = cx->sb_targ;