[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/40714: "%'f" works with printf(3) but not sprintf(3)
The following reply was made to PR lib/40714; it has been noted by GNATS.
From: David Laight <david%l8s.co.uk@localhost>
Subject: Re: lib/40714: "%'f" works with printf(3) but not sprintf(3)
Date: Wed, 5 Aug 2009 22:02:11 +0100
On Sun, Feb 22, 2009 at 03:25:00PM +0000, tnn%NetBSD.org@localhost wrote:
> >Number: 40714
> >Category: lib
> >Synopsis: "%'f" works with printf(3) but not sprintf(3)
The actual problem is that the locale stuff isn't setup, so the
'thousands separator' is '\0' and the grouping definition isn't
the expected "\3" (the code might actuall read from NULL).
snprintf() is putting the \0 into the output buffer, so it gets
truncated when passed to printf.
David Laight: david%l8s.co.uk@localhost
Main Index |
Thread Index |