From: Ulrich Drepper Date: Wed, 20 May 1998 14:50:12 +0000 (+0000) Subject: Update. X-Git-Tag: upstream/2.30~28458 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=93c3d288affc110d03988f453d2cd63867ff449f;p=external%2Fglibc.git Update. 1998-05-20 Ulrich Drepper * stdio-common/vfprintf.c: When precision is specified for %ls or %S handle it correctly. --- diff --git a/ChangeLog b/ChangeLog index 070fac1..65035dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1998-05-20 Ulrich Drepper + + * stdio-common/vfprintf.c: When precision is specified for %ls or + %S handle it correctly. + 1998-05-20 Andreas Jaeger * sysdeps/unix/bsd/vax/vfork.S: Missed double occurences of "the diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c index dcc5cdb..ef9165e 100644 --- a/stdio-common/vfprintf.c +++ b/stdio-common/vfprintf.c @@ -890,8 +890,9 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) assert (__mbsinit (&mbstate)); \ s2 = (const wchar_t *) string; \ string = alloca (len + 1); \ - (void) __wcsrtombs (string, &s2, prec != -1 ? prec : UINT_MAX, \ - &mbstate); \ + (void) __wcsrtombs (string, &s2, len + 1, &mbstate); \ + if (prec < min) \ + len = prec; \ } \ \ if ((width -= len) < 0) \