about summary refs log tree commit diff
path: root/stdio-common/tst-sprintf.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-12-14 07:19:20 +0000
committerUlrich Drepper <drepper@redhat.com>2001-12-14 07:19:20 +0000
commit13c5a4420b0479b07c0efa11d985e4e59dcc369d (patch)
tree6504ae308c1749459b9af04be61e449f7d10424c /stdio-common/tst-sprintf.c
parent9b63f5b4fae14e1636517550d45f453439cbaac6 (diff)
downloadglibc-13c5a4420b0479b07c0efa11d985e4e59dcc369d.tar.gz
glibc-13c5a4420b0479b07c0efa11d985e4e59dcc369d.tar.xz
glibc-13c5a4420b0479b07c0efa11d985e4e59dcc369d.zip
Update.
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.
Diffstat (limited to 'stdio-common/tst-sprintf.c')
-rw-r--r--stdio-common/tst-sprintf.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/stdio-common/tst-sprintf.c b/stdio-common/tst-sprintf.c
new file mode 100644
index 0000000000..afbacd9037
--- /dev/null
+++ b/stdio-common/tst-sprintf.c
@@ -0,0 +1,19 @@
+#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;
+}