Closed p5pRT closed 20 years ago
The following demonstrates the bug.
#!./perl
$x = v2001.2002.2003;
@x = unpack 'U*'\, $x; print "@x\n";
$x = join ''\, map { chr } @x;
printf "%vd\n"\, $x;
This prints:
2001 2002 2003 223.145.2002.2003
With the fix\, it prints:
2001 2002 2003 2001.2002.2003
Here's the fix:
*** doop.c.orig Sat Mar 25 15:29:00 2000
--- doop.c Sat Mar 25 15:31:17 2000
***************
*** 660\,671 ****
if (items-- > 0) {
char *s;
! if (*mark) {
! s = SvPV(*mark\, tmplen);
! sv_setpvn(sv\, s\, tmplen);
! }
! else
! sv_setpv(sv\, "");
mark++;
}
else
--- 660\,668 ----
if (items-- > 0) {
char *s;
! sv_setpv(sv\, "");
! if (*mark)
! sv_catsv(sv\, *mark);
mark++;
}
else
Migrated from rt.perl.org#2716 (status was 'resolved')
Searchable as RT2716$