From 66ffc1b2d68fa1b0b560ec7a33872d96a03e60b5 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Thu, 1 Aug 2019 11:33:51 -0400 Subject: [PATCH] Adding a remark. --- include/simdjson/numberparsing.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/simdjson/numberparsing.h b/include/simdjson/numberparsing.h index 4878a362..c1ee4903 100644 --- a/include/simdjson/numberparsing.h +++ b/include/simdjson/numberparsing.h @@ -547,6 +547,7 @@ static really_inline bool parse_number(const uint8_t *const buf, ParsedJson &pj, while ((*start == '0') || (*start == '.')) { start++; } + // we over-decrement by one when there is a '.' digit_count -= (start - start_digits); if (digit_count >= 19) { // Ok, chances are good that we had an overflow!