diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-13 18:12:23 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-13 18:12:23 +0000 |
commit | 5df7693a57e747d288ae1a7594a516d57bfaf895 (patch) | |
tree | 94aeec66b8598673dbcd991a88979a635596720e /sv.c | |
parent | e096c555fbe3022bdc4d32129b67790ccc948000 (diff) | |
download | perl-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |