Fix output of floating-point values with large exponent.
authorBruno Haible <bruno@clisp.org>
Sun, 4 Nov 2007 14:00:15 +0000 (15:00 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 4 Nov 2007 14:00:15 +0000 (15:00 +0100)
ChangeLog
lib/vasnprintf.c

index 5727254..34465ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-11-04  Bruno Haible  <bruno@clisp.org>
 
+       * lib/vasnprintf.c (scale10_round_decimal_decoded): Fix shift loop.
+
+2007-11-04  Bruno Haible  <bruno@clisp.org>
+
        * modules/relocatable-prog (Files): Add m4/lib-ld.m4.
        Reported by Sylvain Beucler <beuc@gnu.org>.
 
index 55202cb..17a6046 100644 (file)
@@ -1151,7 +1151,7 @@ scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n)
                size_t count;
                for (count = m.nlimbs; count > 0; count--)
                  {
-                   accu += (mp_twolimb_t) *sourceptr++ << s;
+                   accu += (mp_twolimb_t) *sourceptr++ << s_bits;
                    *destptr++ = (mp_limb_t) accu;
                    accu = accu >> GMP_LIMB_BITS;
                  }