summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorJosh ben Jore <jjore@cpan.org>2010-07-12 23:56:55 -0700
committerJosh ben Jore <jjore@cpan.org>2010-07-12 23:56:55 -0700
commit45aab8effbcc58e2d502958568938cf2eabb7d62 (patch)
treed6b72be6b41598a2e17435a4d727ff8ebcab9408 /sv.c
parentd024465fe3cc8e4457de17ba501f5b28a53f0872 (diff)
downloadperl-45aab8effbcc58e2d502958568938cf2eabb7d62.tar.gz
Reset variables being initialized by readline before we do possibly blocking I/O
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index 39689fd131..7ba5ab7621 100644
--- a/sv.c
+++ b/sv.c
@@ -7040,6 +7040,7 @@ Perl_sv_gets(pTHX_ register SV *const sv, register PerlIO *const fp, I32 append)
}
SvPOK_only(sv);
+ SvCUR_set(sv,0);
if (PerlIO_isutf8(fp))
SvUTF8_on(sv);