mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-25 02:33:36 +08:00
13c5a4420b
2001-12-13 Ulrich Drepper <drepper@redhat.com> * stdio-common/tst-sprintf.c: New file. 2001-12-13 Andreas Schwab <schwab@suse.de> * stdio-common/vfprintf.c (process_string_arg): Correctly handle zero precision with wide character string format.
20 lines
289 B
C
20 lines
289 B
C
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
char buf[100];
|
|
int result = 0;
|
|
|
|
if (sprintf (buf, "%.0ls", L"foo") != 0
|
|
|| strlen (buf) != 0)
|
|
{
|
|
puts ("sprintf (buf, \"%.0ls\", L\"foo\") produced some output\n");
|
|
result = 1;
|
|
}
|
|
|
|
return result;
|
|
}
|