From b00d4c096762021ffe76551389c4247eaa4f9ca1 Mon Sep 17 00:00:00 2001 From: Gavin Hayes Date: Thu, 21 Sep 2023 21:36:59 -0400 Subject: [PATCH] strtod: handle NaN properly --- third_party/gdtoa/strtod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/gdtoa/strtod.c b/third_party/gdtoa/strtod.c index 77e405342..6597bc061 100644 --- a/third_party/gdtoa/strtod.c +++ b/third_party/gdtoa/strtod.c @@ -237,8 +237,8 @@ dig_done: word1(&rv) = bits[0]; } else { - word0(&rv) = NAN_WORD0; - word1(&rv) = NAN_WORD1; + word0(&rv) = 0x7ff80000; + word1(&rv) = 0x0; } goto ret; }