Message-Id: <
200009142306.TAA20082@leggy.zk3.dec.com>
p4raw-id: //depot/perl@7090
if (hibit) {
STRLEN len = SvCUR(sv) + 1; /* Plus the \0 */
SvPVX(sv) = (char*)bytes_to_utf8((U8*)s, &len);
- SvCUR(sv) = len - 1;
+ SvCUR(sv) = len; /* No longer know the real size. */
SvUTF8_on(sv);
- Safefree(s); /* No longer using what was there before */
+ Safefree(s); /* No longer using what was there before. */
}
}
SvCUR_set(sv, d - ostart);
SvPOK_on(sv);
sv_utf8_upgrade(sv);
+ /* this just broke our allocation above... */
+ SvGROW(sv, send - start);
d = SvPVX(sv) + SvCUR(sv);
has_utf = TRUE;
}