[PATCH] Fix printf_fphex
Jakub Jelinek
jakub@redhat.com
Thu Nov 16 03:33:00 GMT 2000
Hi!
No wonder why printf_fphex did not work properly on alpha, it is wonder why
it works on other platforms though...
2000-11-16 Jakub Jelinek <jakub@redhat.com>
* sysdeps/generic/printf_fphex.c (__printf_fphex): Compute correctly
end of wexpbuf buffer.
--- libc/sysdeps/generic/printf_fphex.c.jj Mon Oct 16 16:19:42 2000
+++ libc/sysdeps/generic/printf_fphex.c Thu Nov 16 06:08:39 2000
@@ -422,7 +422,8 @@ __printf_fphex (FILE *fp,
/* Now we can compute the exponent string. */
expstr = _itoa_word (exponent, expbuf + sizeof expbuf, 10, 0);
- wexpstr = _itowa_word (exponent, wexpbuf + sizeof wexpbuf, 10, 0);
+ wexpstr = _itowa_word (exponent,
+ wexpbuf + sizeof wexpbuf / sizeof (wchar_t), 10, 0);
/* Now we have all information to compute the size. */
width -= ((negative || info->showsign || info->space)
Jakub
More information about the Libc-hacker
mailing list