X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp_hot.c;h=f0d3e98845601e6827439a62197db3ea67207c8f;hb=2b5e58c4e3614e505a895c6ac7f709db82f8f7f4;hp=289506975584b1a1e645e48e0c308cab1d317771;hpb=765f542df20317f47bb284c276cd0abfb50dcfd6;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp_hot.c b/pp_hot.c index 2895069..f0d3e98 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -1484,10 +1484,14 @@ Perl_do_readline(pTHX) tmplen = SvLEN(sv); /* remember if already alloced */ if (!tmplen) Sv_Grow(sv, 80); /* try short-buffering it */ - if (type == OP_RCATLINE) + offset = 0; + if (type == OP_RCATLINE && SvOK(sv)) { + if (!SvPOK(sv)) { + STRLEN n_a; + (void)SvPV_force(sv, n_a); + } offset = SvCUR(sv); - else - offset = 0; + } } else { sv = sv_2mortal(NEWSV(57, 80));