summaryrefslogtreecommitdiff
path: root/stdio-common/printf_fphex.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-08-07 19:28:26 +0000
committerJakub Jelinek <jakub@redhat.com>2006-08-07 19:28:26 +0000
commit503d6a958581777473c31f73113d0fa6cff19b30 (patch)
treec8526f0403ac272cba94213a3c5b10a369876d78 /stdio-common/printf_fphex.c
parent98d2266156a49df5f93726c8f0b148bbdee41c9d (diff)
Updated to fedora-glibc-20060807T1859cvs/fedora-glibc-2_4_90-18
Diffstat (limited to 'stdio-common/printf_fphex.c')
-rw-r--r--stdio-common/printf_fphex.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/stdio-common/printf_fphex.c b/stdio-common/printf_fphex.c
index fd790d5bf3..4e30d94c61 100644
--- a/stdio-common/printf_fphex.c
+++ b/stdio-common/printf_fphex.c
@@ -1,5 +1,5 @@
/* Print floating point number in hexadecimal notation according to ISO C99.
- Copyright (C) 1997-2002,2004 Free Software Foundation, Inc.
+ Copyright (C) 1997-2002,2004,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -399,12 +399,15 @@ __printf_fphex (FILE *fp,
++leading;
else
{
- leading = 1;
+ leading = '1';
if (expnegative)
{
- exponent += 4;
- if (exponent >= 0)
- expnegative = 0;
+ exponent -= 4;
+ if (exponent <= 0)
+ {
+ exponent = -exponent;
+ expnegative = 0;
+ }
}
else
exponent += 4;