From 4aac019a0efd59011a48d031ad046c934c7e8365 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 16 Mar 2016 16:35:22 -0400 Subject: fix padding string formats to width in wide printf variants the idiom fprintf(f, "%.*s", n, "") was wrongly used in vfwprintf as a means of producing n spaces; instead it produces no output. the correct form is fprintf(f, "%*s", n, ""), using width instead of precision, since for %s the later is a maximum rather than a minimum. --- src/stdio/vfwprintf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/stdio/vfwprintf.c b/src/stdio/vfwprintf.c index f06d5aed..f9f1ecfd 100644 --- a/src/stdio/vfwprintf.c +++ b/src/stdio/vfwprintf.c @@ -288,9 +288,9 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_ z = wmemchr(a, 0, p); if (z) p=z-a; if (w