Perl 3.0 patchlevel 1 printf() bug?

Larry Wall lwall at jpl-devvax.JPL.NASA.GOV
Fri Nov 10 10:06:42 AEST 1989


In article <JHPB.89Nov9073339 at lancia.ATT.COM> jhpb at lancia.ATT.COM (Joseph H. Buehler) writes:
: I'm running perl 3.0 with patch #1, and the three password structure
: fields #undef'd in config.h

The results of a mere typo in a metaconfig unit.  This will be fixed in patch 2.

: The following perl script fails.
: 
: 	$char = 0x44;
: 	$threshold = 65535;
: 	$key = "a";
: 	$start{$key} = 512;
: 	printf("    '%c', $threshold, %d,\n", $char, 0+$start{$key});
: 
: Perl 2 patch 18 gives the output (angle brackets inserted by me to
: demark the string limits):
: 
: <    'D', 65535, 512,>
: 
: Perl 3 patch 1 produces:
: 
: <D', 65535, 512,>
: 
: Anyone know what's going on?

In binary-izing perl I short circuited the usual %c processing because
some machines can't do printf("%c", 0), and neglected to include the
format string up to the %.  Will be fixed in patch 2.

Larry Wall
lwall at jpl-devvax.jpl.nasa.gov



More information about the Comp.sources.bugs mailing list