summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 15ba94c041..a622c53548 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1509,7 +1509,7 @@ Perl_do_readline(pTHX)
sv_unref(sv);
(void)SvUPGRADE(sv, SVt_PV);
tmplen = SvLEN(sv); /* remember if already alloced */
- if (!tmplen)
+ if (!tmplen && !SvREADONLY(sv))
Sv_Grow(sv, 80); /* try short-buffering it */
offset = 0;
if (type == OP_RCATLINE && SvOK(sv)) {