NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lib/40714: "%'f" works with printf(3) but not sprintf(3)
>Number: 40714
>Category: lib
>Synopsis: "%'f" works with printf(3) but not sprintf(3)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Feb 22 15:25:00 +0000 2009
>Originator: Tobias Nygren
>Release: 5.99.7 amd64
>Organization:
>Environment:
>Description:
"%'f" format specifier terminates output early when used with sprintf(3) family
of functions.
>How-To-Repeat:
The second line in the output of the following program is not printed correctly.
#include <stdio.h>
int main(void) {
char buf[128];
printf("test: %'f\n", 123.0f);
sprintf(buf, "test: %'f\n", 123.0f);
printf("%s", buf);
}
> ./test
test: 123.000000
test: 1
>Fix:
Home |
Main Index |
Thread Index |
Old Index