From fc85fbeef0083c6f9b6224936de89d579383589e Mon Sep 17 00:00:00 2001 From: abolz Date: Fri, 15 Jun 2018 13:44:43 +0200 Subject: [PATCH] Fix implicit signed/unsigned conversion and a small glitch in the error computation - part 2 --- include/rapidjson/internal/strtod.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/rapidjson/internal/strtod.h b/include/rapidjson/internal/strtod.h index ba18c1e..cb63563 100644 --- a/include/rapidjson/internal/strtod.h +++ b/include/rapidjson/internal/strtod.h @@ -165,7 +165,7 @@ inline bool StrtodDiyFp(const char* decimals, int dLen, int dExp, double* result int adjustment = dExp - actualExp; RAPIDJSON_ASSERT(adjustment >= 1 && adjustment < 8); v = v * kPow10[adjustment - 1]; - if (dLen + adjustment > 19u) // has more digits than decimal digits in 64-bit + if (dLen + adjustment > 19) // has more digits than decimal digits in 64-bit error += kUlp / 2; }