summary refs log tree commit diff
path: root/stdio-common/vfprintf.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2014-05-01 15:50:27 +0200
committerAndreas Schwab <schwab@linux-m68k.org>2014-05-01 20:42:08 +0200
commit4fdfe821e20a70670b3d03deb2abed5d8c83e51b (patch)
tree14b65b10a6c9a96452405137ec1bce22424cb204 /stdio-common/vfprintf.c
parent0cdddc25a47509262a9a55a343395971b492b0fa (diff)
downloadglibc-4fdfe821e20a70670b3d03deb2abed5d8c83e51b.tar.gz
glibc-4fdfe821e20a70670b3d03deb2abed5d8c83e51b.tar.xz
glibc-4fdfe821e20a70670b3d03deb2abed5d8c83e51b.zip
Correctly handle %p in wprintf (BZ #16890)
Diffstat (limited to 'stdio-common/vfprintf.c')
-rw-r--r--stdio-common/vfprintf.c3
1 files changed, 2 insertions, 1 deletions
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);					      \
 	  }								      \
       }									      \