bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

vasnprintf fix


From: Bruno Haible
Subject: vasnprintf fix
Date: Sun, 4 Nov 2007 14:59:46 +0100
User-agent: KMail/1.5.4

The floating-point output code crashed due to an abort() for values with
large exponents (> 1e34 for 'double'). This fixes it.

2007-11-04  Bruno Haible  <address@hidden>

        * lib/vasnprintf.c (scale10_round_decimal_decoded): Fix shift loop.

--- lib/vasnprintf.c.orig       2007-11-04 14:55:02.000000000 +0100
+++ lib/vasnprintf.c    2007-11-04 14:54:53.000000000 +0100
@@ -1151,7 +1151,7 @@
                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;
                  }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]