Skip to content

Commit

Permalink
Merge pull request #183 from redis-performance/fix.parse_infnan.plus.inf
Browse files Browse the repository at this point in the history
Added missing FASTFLOAT_ALLOWS_LEADING_PLUS ifdef check in parse_infnan
  • Loading branch information
lemire committed Mar 7, 2023
2 parents 808cd24 + c8886eb commit eb8c001
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/fast_float/parse_number.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit eb8c001

Please sign in to comment.