Skip to content

Commit

Permalink
Fix for fmtlib#2359
Browse files Browse the repository at this point in the history
  • Loading branch information
phprus committed Jun 14, 2021
1 parent a59678f commit 87613a7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/fmt/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -2119,9 +2119,10 @@ FMT_CONSTEXPR auto parse_nonnegative_int(const Char*& begin, const Char* end,
if (num_digits == std::numeric_limits<int>::digits10 + 1 &&
prev * 10ull + unsigned(p[-1] - '0') <= big) {
return static_cast<int>(value);
} else {
eh.on_error("number is too big");
return -1;
}
eh.on_error("number is too big");
return -1;
}

// Parses fill and alignment.
Expand Down

0 comments on commit 87613a7

Please sign in to comment.