readd missing perldelta.pod changes from changes#6339,6376
[p5sagit/p5-mst-13.2.git] / mg.c
diff --git a/mg.c b/mg.c
index b1049c5..aee2790 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -614,6 +614,9 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
            {
                i = t1 - s1;
                s = rx->subbeg + s1;
+                if (!rx->subbeg)
+                   break;
+
              getrx:
                if (i >= 0) {
                    bool was_tainted;