diff options
author | Abhijit Menon-Sen <ams@wiw.org> | 2002-09-17 18:09:32 +0000 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2002-09-17 18:09:32 +0000 |
commit | 2b5e58c4e3614e505a895c6ac7f709db82f8f7f4 (patch) | |
tree | 9d0f0b7d730bb3e4d3de321fc1dd299e8e2acbe9 /pp_hot.c | |
parent | dc33ebcf89adb9fd4e96220dc56a16ce8d9115d2 (diff) | |
download | perl-2b5e58c4e3614e505a895c6ac7f709db82f8f7f4.tar.gz |
Fix #17375 (rcatline didn't work on a formerly-defined undef) by
checking for SvOK in do_readline().
p4raw-id: //depot/perl@17910
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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)); |