From 841d7a391d6b6e9e2fb152733c6d04ba1c6319af Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Fri, 15 Sep 2000 00:15:48 +0000 Subject: [PATCH] Botched the #7090 check-in. p4raw-id: //depot/perl@7092 --- sv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sv.c b/sv.c index a694fed..f5f6421 100644 --- a/sv.c +++ b/sv.c @@ -2412,7 +2412,8 @@ Perl_sv_utf8_upgrade(pTHX_ register SV *sv) if (hibit) { STRLEN len = SvCUR(sv) + 1; /* Plus the \0 */ SvPVX(sv) = (char*)bytes_to_utf8((U8*)s, &len); - SvCUR(sv) = len; /* No longer know the real size. */ + SvCUR(sv) = len - 1; + SvLEN(sv) = len; /* No longer know the real size. */ SvUTF8_on(sv); Safefree(s); /* No longer using what was there before. */ } -- 2.7.4