summary refs log tree commit diff
path: root/stdio-common/printf_fphex.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/printf_fphex.c')
-rw-r--r--stdio-common/printf_fphex.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/stdio-common/printf_fphex.c b/stdio-common/printf_fphex.c
index fd790d5bf3..6711ccc82b 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,11 +399,11 @@ __printf_fphex (FILE *fp,
 		++leading;
 	      else
 		{
-		  leading = 1;
+		  leading = '1';
 		  if (expnegative)
 		    {
-		      exponent += 4;
-		      if (exponent >= 0)
+		      exponent -= 4;
+		      if (exponent <= 0)
 			expnegative = 0;
 		    }
 		  else