about summary refs log tree commit diff
path: root/stdio-common
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-08-17 16:00:14 +0000
committerUlrich Drepper <drepper@redhat.com>1999-08-17 16:00:14 +0000
commitd198009a6e17e728fcfe414e19a2157e0dcf9b93 (patch)
treeaa3b0c910f764e862af00352215d88f0ced0781a /stdio-common
parentaa6adf822954e7c2b1b631f849598b1cab3450e5 (diff)
downloadglibc-d198009a6e17e728fcfe414e19a2157e0dcf9b93.tar.gz
glibc-d198009a6e17e728fcfe414e19a2157e0dcf9b93.tar.xz
glibc-d198009a6e17e728fcfe414e19a2157e0dcf9b93.zip
Update.
1999-08-17  Ulrich Drepper  <drepper@cygnus.com>

	* stdio-common/vfprintf.c (process_string_arg): Correct last patch
	and write correct number of bytes in case of %ls with precision.
	Reported by Shinya Hanataka <hanataka@abyss.rim.or.jp>.
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/vfprintf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index 780ac76c0d..d45e7d96fc 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -1109,8 +1109,8 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
 	    if (prec > 0)						      \
 	      {								      \
 		/* The string `s2' might not be NUL terminated.  */	      \
-		string = (char *) alloca (prec + 1);			      \
-		len = __wcsrtombs (string, &s2, prec + 1, &mbstate);	      \
+		string = (char *) alloca (prec);			      \
+		len = __wcsrtombs (string, &s2, prec, &mbstate);	      \
 	      }								      \
 	    else							      \
 	      {								      \