From: Ulrich Drepper Date: Tue, 17 Aug 1999 16:01:02 +0000 (+0000) Subject: (process_arg): Correct last patch and write correct number of bytes X-Git-Tag: cvs/glibc_2-1-2~132 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0efeb49287e2061a4253db8ccce2c901d2bba77e;p=thirdparty%2Fglibc.git (process_arg): Correct last patch and write correct number of bytes in case of %ls with precision. --- diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c index bc66393a366..3249911cc7e 100644 --- a/stdio-common/vfprintf.c +++ b/stdio-common/vfprintf.c @@ -919,8 +919,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 \ { \