projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f46711e
)
[perl #72729] Truncate sv_gets(sv) only when not appending to a string
author
Josh ben Jore
<jjore@cpan.org>
Thu, 15 Jul 2010 05:02:28 +0000
(22:02 -0700)
committer
Josh ben Jore
<jjore@cpan.org>
Thu, 15 Jul 2010 05:55:55 +0000
(22:55 -0700)
sv.c
patch
|
blob
|
history
diff --git
a/sv.c
b/sv.c
index
a069b09
..
f555fc1
100644
(file)
--- a/
sv.c
+++ b/
sv.c
@@
-7086,7
+7086,9
@@
Perl_sv_gets(pTHX_ register SV *const sv, register PerlIO *const fp, I32 append)
}
SvPOK_only(sv);
- SvCUR_set(sv,0);
+ if (!append) {
+ SvCUR_set(sv,0);
+ }
if (PerlIO_isutf8(fp))
SvUTF8_on(sv);