Botched the #7090 check-in.
authorJarkko Hietaniemi <jhi@iki.fi>
Fri, 15 Sep 2000 00:15:48 +0000 (00:15 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Fri, 15 Sep 2000 00:15:48 +0000 (00:15 +0000)
p4raw-id: //depot/perl@7092

sv.c

diff --git a/sv.c b/sv.c
index a694fed..f5f6421 100644 (file)
--- 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. */
     }