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.
+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.
+
2001-12-13 Thorsten Kukuk <kukuk@suse.de>
* sysdeps/posix/cuserid.c (cuserid): If we don't find the UID,
--- /dev/null
+#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;
+}
\
memset (&mbstate, '\0', sizeof (mbstate_t)); \
\
- if (prec > 0) \
+ if (prec >= 0) \
{ \
/* The string `s2' might not be NUL terminated. */ \
if (prec < 32768 \