Skip to content

Commit eb8c001

Browse files
authored
Merge pull request #183 from redis-performance/fix.parse_infnan.plus.inf
Added missing FASTFLOAT_ALLOWS_LEADING_PLUS ifdef check in parse_infnan
2 parents 808cd24 + c8886eb commit eb8c001

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/fast_float/parse_number.h

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ from_chars_result parse_infnan(const char *first, const char *last, T &value) n
2929
minusSign = true;
3030
++first;
3131
}
32+
#if FASTFLOAT_ALLOWS_LEADING_PLUS // disabled by default
33+
if (*first == '+') {
34+
++first;
35+
}
36+
#endif
3237
if (last - first >= 3) {
3338
if (fastfloat_strncasecmp(first, "nan", 3)) {
3439
answer.ptr = (first += 3);

0 commit comments

Comments
 (0)