summaryrefslogtreecommitdiff
path: root/stdlib/strtod_l.c
diff options
context:
space:
mode:
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 a0cd4f1afe..ccd117a9f1 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;