* stdio-common/vfprintf.c (process_string_arg): For wide character
	version, handle precision also correctly.
This commit is contained in:
Ulrich Drepper 2000-07-23 17:40:46 +00:00
parent 3accf5d13d
commit 6a1fc4ed17
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2000-07-23 Ulrich Drepper <drepper@redhat.com> 2000-07-23 Ulrich Drepper <drepper@redhat.com>
* stdio-common/vfprintf.c (process_string_arg): For wide character
version, handle precision also correctly.
* nss/nss_files/files-hosts.c: Correct problem with three or more * nss/nss_files/files-hosts.c: Correct problem with three or more
entries with the same name. entries with the same name.

View File

@ -1037,7 +1037,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
string = (CHAR_T *) alloca (len * sizeof (wchar_t)); \ string = (CHAR_T *) alloca (len * sizeof (wchar_t)); \
\ \
memset (&mbstate, '\0', sizeof (mbstate_t)); \ memset (&mbstate, '\0', sizeof (mbstate_t)); \
len = __mbsrtowcs (string, &mbs, len, &mbstate); \ len = __mbsnrtowcs (string, &mbs, len, len, &mbstate); \
if (len == (size_t) -1) \ if (len == (size_t) -1) \
{ \ { \
/* Illegal multibyte character. */ \ /* Illegal multibyte character. */ \