From a535ce141fc6862a2013dacbed935b9aafb6a8f1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Aug 2000 03:10:27 +0000 Subject: Update. 2000-07-31 H.J. Lu * sysdeps/generic/printf_fphex.c (__printf_fphex): Correctly handle the wchar_t array. --- ChangeLog | 5 +++++ sysdeps/generic/printf_fphex.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1709af54c8..2de263836d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-07-31 H.J. Lu + + * sysdeps/generic/printf_fphex.c (__printf_fphex): Correctly + handle the wchar_t array. + 2000-07-31 Ulrich Drepper * iconvdata/gb18030.c: Don't map to and from positions in ISO diff --git a/sysdeps/generic/printf_fphex.c b/sysdeps/generic/printf_fphex.c index 2b10fa62ac..d4cba3f4e7 100644 --- a/sysdeps/generic/printf_fphex.c +++ b/sysdeps/generic/printf_fphex.c @@ -284,21 +284,21 @@ __printf_fphex (FILE *fp, if (sizeof (unsigned long int) > 6) { - wnumstr = _itowa_word (num, wnumbuf + sizeof wnumbuf, 16, + wnumstr = _itowa_word (num, wnumbuf + (sizeof wnumbuf) / sizeof (wchar_t), 16, info->spec == 'A'); numstr = _itoa_word (num, numbuf + sizeof numbuf, 16, info->spec == 'A'); } else { - wnumstr = _itowa (num, wnumbuf + sizeof wnumbuf, 16, + wnumstr = _itowa (num, wnumbuf + sizeof wnumbuf / sizeof (wchar_t), 16, info->spec == 'A'); numstr = _itoa (num, numbuf + sizeof numbuf, 16, info->spec == 'A'); } /* Fill with zeroes. */ - while (wnumstr > wnumbuf + (sizeof wnumbuf - 52 / 4)) + while (wnumstr > wnumbuf + (sizeof wnumbuf - 52) / sizeof (wchar_t)) { *--wnumstr = L'0'; *--numstr = '0'; -- cgit v1.2.3