From 361924fb61c043627d4179e941a102d543f6efa0 Mon Sep 17 00:00:00 2001 From: Florian Loitsch Date: Sat, 26 Jul 2014 14:57:45 +0200 Subject: [PATCH] error can shift more than 32 bits. See issue 47. --- src/strtod.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/strtod.cc b/src/strtod.cc index 34717562..17abcbb2 100644 --- a/src/strtod.cc +++ b/src/strtod.cc @@ -286,7 +286,7 @@ static bool DiyFpStrtod(Vector buffer, const int kDenominator = 1 << kDenominatorLog; // Move the remaining decimals into the exponent. exponent += remaining_decimals; - int error = (remaining_decimals == 0 ? 0 : kDenominator / 2); + uint64_t error = (remaining_decimals == 0 ? 0 : kDenominator / 2); int old_e = input.e(); input.Normalize();