diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-05-20 14:50:12 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-05-20 14:50:12 +0000 |
commit | 93c3d288affc110d03988f453d2cd63867ff449f (patch) | |
tree | c7a38b21d58285d73d1a472648c25369303af77f | |
parent | 05fdf2dfc9817131cbddb662f9d99646f6192d88 (diff) | |
download | glibc-93c3d288affc110d03988f453d2cd63867ff449f.tar glibc-93c3d288affc110d03988f453d2cd63867ff449f.tar.gz glibc-93c3d288affc110d03988f453d2cd63867ff449f.tar.bz2 glibc-93c3d288affc110d03988f453d2cd63867ff449f.zip |
Update.
1998-05-20 Ulrich Drepper <drepper@cygnus.com>
* stdio-common/vfprintf.c: When precision is specified for %ls or
%S handle it correctly.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | stdio-common/vfprintf.c | 5 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,8 @@ +1998-05-20 Ulrich Drepper <drepper@cygnus.com> + + * stdio-common/vfprintf.c: When precision is specified for %ls or + %S handle it correctly. + 1998-05-20 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/unix/bsd/vax/vfork.S: Missed double occurences of "the diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c index dcc5cdbdaa..ef9165e448 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) \ |