(__printf_fphex): Fix exponent computation after rounding.
authordrepper <drepper>
Thu, 3 Aug 2006 09:21:20 +0000 (09:21 +0000)
committerdrepper <drepper>
Thu, 3 Aug 2006 09:21:20 +0000 (09:21 +0000)
stdio-common/printf_fphex.c

index 2982463..6711ccc 100644 (file)
@@ -402,8 +402,8 @@ __printf_fphex (FILE *fp,
                  leading = '1';
                  if (expnegative)
                    {
-                     exponent += 4;
-                     if (exponent >= 0)
+                     exponent -= 4;
+                     if (exponent <= 0)
                        expnegative = 0;
                    }
                  else