diff options
author | Joseph Myers <joseph@codesourcery.com> | 2012-08-27 16:04:19 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2012-08-27 16:04:19 +0000 |
commit | 7efb4737dd729326e5339facbd785cee43fb53b3 (patch) | |
tree | 773cdbf4f4e654c69d480d5b8300775292e8ada3 /stdlib/strtod_l.c | |
parent | af92131a8eb7c2661a5bb0e31dc4cb028c85e0c6 (diff) | |
download | glibc-7efb4737dd729326e5339facbd785cee43fb53b3.zip glibc-7efb4737dd729326e5339facbd785cee43fb53b3.tar.gz glibc-7efb4737dd729326e5339facbd785cee43fb53b3.tar.bz2 |
Fix sign of zero on strtod underflow (bug 14519).
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 a0cd4f1..ccd117a 100644 --- a/stdlib/strtod_l.c +++ b/stdlib/strtod_l.c @@ -183,7 +183,7 @@ round_and_return (mp_limb_t *retval, intmax_t exponent, int negative, if (exponent < MIN_EXP - 1 - MANT_DIG) { __set_errno (ERANGE); - return 0.0; + return negative ? -0.0 : 0.0; } mp_size_t shift = MIN_EXP - 1 - exponent; |