From 4fdfe821e20a70670b3d03deb2abed5d8c83e51b Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 1 May 2014 15:50:27 +0200 Subject: Correctly handle %p in wprintf (BZ #16890) --- stdio-common/vfprintf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'stdio-common/vfprintf.c') diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c index f7e5f61cc8..c4ff8334b2 100644 --- a/stdio-common/vfprintf.c +++ b/stdio-common/vfprintf.c @@ -936,7 +936,8 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) /* Make sure the full string "(nil)" is printed. */ \ if (prec < 5) \ prec = 5; \ - is_long = 0; /* This is no wide-char string. */ \ + /* This is a wide string iff compiling wprintf. */ \ + is_long = sizeof (CHAR_T) > 1; \ goto LABEL (print_string); \ } \ } \ -- cgit v1.2.1