summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-01-13 18:12:23 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-13 18:12:23 +0000
commit5df7693a57e747d288ae1a7594a516d57bfaf895 (patch)
tree94aeec66b8598673dbcd991a88979a635596720e /sv.c
parente096c555fbe3022bdc4d32129b67790ccc948000 (diff)
downloadperl-5df7693a57e747d288ae1a7594a516d57bfaf895.tar.gz
Grow the buffer in case Unicode caused size changes
(and it very probably did). p4raw-id: //depot/perl@14243
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sv.c b/sv.c
index 3de686f40e..0e0c5fcf44 100644
--- a/sv.c
+++ b/sv.c
@@ -8362,10 +8362,8 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
if (elen) {
if (is_utf8 != has_utf8) {
if (is_utf8) {
- if (SvCUR(sv)) {
+ if (SvCUR(sv))
sv_utf8_upgrade(sv);
- p = SvEND(sv);
- }
}
else {
SV *nsv = sv_2mortal(newSVpvn(eptr, elen));
@@ -8373,6 +8371,8 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
eptr = SvPVX(nsv);
elen = SvCUR(nsv);
}
+ SvGROW(sv, SvCUR(sv) + elen + 1);
+ p = SvEND(sv);
}
Copy(eptr, p, elen, char);
p += elen;