From c8886eb31d15e1034e81cbd6d5c720e2fbb70801 Mon Sep 17 00:00:00 2001 From: filipecosta90 Date: Tue, 7 Mar 2023 00:31:14 +0000 Subject: [PATCH] Added missing FASTFLOAT_ALLOWS_LEADING_PLUS ifdef check in parse_infnan --- include/fast_float/parse_number.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/fast_float/parse_number.h b/include/fast_float/parse_number.h index 3284443..5f5c264 100644 --- a/include/fast_float/parse_number.h +++ b/include/fast_float/parse_number.h @@ -29,6 +29,11 @@ from_chars_result parse_infnan(const char *first, const char *last, T &value) n minusSign = true; ++first; } +#if FASTFLOAT_ALLOWS_LEADING_PLUS // disabled by default + if (*first == '+') { + ++first; + } +#endif if (last - first >= 3) { if (fastfloat_strncasecmp(first, "nan", 3)) { answer.ptr = (first += 3);