diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-11-13 12:59:54 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2013-11-13 12:59:54 +0000 |
commit | 9310c284ae91f13247c9dd7ff58fc2683b9c523d (patch) | |
tree | 86478302002c020e38bc75f43abce8ecb37528b1 /stdlib/strtod_l.c | |
parent | 7a2ad8cf392acfcaef319e722dda9101d4d8b6bd (diff) | |
download | glibc-9310c284ae91f13247c9dd7ff58fc2683b9c523d.tar glibc-9310c284ae91f13247c9dd7ff58fc2683b9c523d.tar.gz glibc-9310c284ae91f13247c9dd7ff58fc2683b9c523d.tar.bz2 glibc-9310c284ae91f13247c9dd7ff58fc2683b9c523d.zip |
Fix strtod rounding of half the least subnormal (bug 16151).
Diffstat (limited to 'stdlib/strtod_l.c')
-rw-r--r-- | stdlib/strtod_l.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c index 90541cd48f..c1c5c0db4e 100644 --- a/stdlib/strtod_l.c +++ b/stdlib/strtod_l.c @@ -228,7 +228,7 @@ round_and_return (mp_limb_t *retval, intmax_t exponent, int negative, round_limb = retval[RETURN_LIMB_SIZE - 1]; round_bit = (MANT_DIG - 1) % BITS_PER_MP_LIMB; - for (i = 0; i < RETURN_LIMB_SIZE; ++i) + for (i = 0; i < RETURN_LIMB_SIZE - 1; ++i) more_bits |= retval[i] != 0; MPN_ZERO (retval, RETURN_LIMB_SIZE); } |