]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 1 Aug 2000 03:10:27 +0000 (03:10 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 1 Aug 2000 03:10:27 +0000 (03:10 +0000)
2000-07-31  H.J. Lu  <hjl@gnu.org>

* sysdeps/generic/printf_fphex.c (__printf_fphex): Correctly
handle the wchar_t array.

ChangeLog
sysdeps/generic/printf_fphex.c

index 1709af54c8ef46d84cf765c2e31c5a7b79d69d89..2de263836dbf09ed7bac67c70aa3c7ccef15d0ad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-07-31  H.J. Lu  <hjl@gnu.org>
+
+       * sysdeps/generic/printf_fphex.c (__printf_fphex): Correctly
+       handle the wchar_t array.
+
 2000-07-31  Ulrich Drepper  <drepper@redhat.com>
 
        * iconvdata/gb18030.c: Don't map to and from positions in ISO
index 2b10fa62acb263368b2f425000c2051cb6adf89a..d4cba3f4e7878580ae378d0e776d771c4fcb30a2 100644 (file)
@@ -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';