From f37d87db76882686e6f407826f491044f27328d9 Mon Sep 17 00:00:00 2001 From: nsz Date: Wed, 11 Apr 2012 13:52:58 +0200 Subject: [PATCH] strtod: add zero test --- src/stdlib/strtod.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/stdlib/strtod.c b/src/stdlib/strtod.c index 08ff74a..51e5a92 100644 --- a/src/stdlib/strtod.c +++ b/src/stdlib/strtod.c @@ -60,7 +60,9 @@ static struct { char *s; double f; } t[] = { -// {"-.00000", -0.0}, + {"0", 0.0}, + {"00.00", 0.0}, + {"-.00000", -0.0}, {"1e+1000000", INFINITY}, {"1e-1000000", 0}, // 2^-1074 * 0.5 - eps -- 2.20.1