(Replaced by #7440.)
[p5sagit/p5-mst-13.2.git] / pp_hot.c
index 9b0573b..3f85116 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -172,8 +172,12 @@ PP(pp_concat)
                /* Take a copy since we're about to overwrite TARG */
                olds = s = (U8*)savepvn((char*)s, len);
            }
-           if (!SvOK(left) && SvTYPE(left) <= SVt_PVMG)
-               sv_setpv(left, "");     /* Suppress warning. */
+           if (!SvOK(left) && SvTYPE(left) <= SVt_PVMG) {
+               if (SvREADONLY(left))
+                   left = sv_2mortal(newSVsv(left));
+               else
+                   sv_setpv(left, ""); /* Suppress warning. */
+           }
             l = (U8*)SvPV(left, targlen);
            left_utf |= DO_UTF8(left);
             if (TARG != left)