aboutsummaryrefslogtreecommitdiff
path: root/stdlib/strtod_l.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-11-13 12:59:54 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-11-13 12:59:54 +0000
commit9310c284ae91f13247c9dd7ff58fc2683b9c523d (patch)
tree86478302002c020e38bc75f43abce8ecb37528b1 /stdlib/strtod_l.c
parent7a2ad8cf392acfcaef319e722dda9101d4d8b6bd (diff)
downloadglibc-9310c284ae91f13247c9dd7ff58fc2683b9c523d.zip
glibc-9310c284ae91f13247c9dd7ff58fc2683b9c523d.tar.gz
glibc-9310c284ae91f13247c9dd7ff58fc2683b9c523d.tar.bz2
Fix strtod rounding of half the least subnormal (bug 16151).
Diffstat (limited to 'stdlib/strtod_l.c')
-rw-r--r--stdlib/strtod_l.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c
index 90541cd..c1c5c0d 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);
}