mirror of
https://github.com/HowardHinnant/date.git
synced 2024-12-25 23:40:53 +08:00
Count sign as part of the character count.
This commit is contained in:
parent
0ef86f1ced
commit
ab37c362e3
@ -6351,7 +6351,10 @@ read_signed(std::basic_istream<CharT, Traits>& is, unsigned m = 1, unsigned M =
|
||||
if (('0' <= c && c <= '9') || c == '-' || c == '+')
|
||||
{
|
||||
if (c == '-' || c == '+')
|
||||
{
|
||||
(void)is.get();
|
||||
--M;
|
||||
}
|
||||
auto x = static_cast<int>(read_unsigned(is, std::max(m, 1u), M));
|
||||
if (!is.fail())
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user