mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-01 11:44:26 +02:00
Character classification functions (isspace, isalnum) are undefined for signed chars
Convert them to int using char_traits or static_cast to unsigned char
This commit is contained in:
committed by
Howard Hinnant
parent
0197889505
commit
07876e4433
@@ -7180,7 +7180,7 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
|
||||
}
|
||||
else // !command
|
||||
{
|
||||
if (isspace(*fmt))
|
||||
if (isspace(static_cast<unsigned char>(*fmt)))
|
||||
ws(is); // space matches 0 or more white space characters
|
||||
else
|
||||
read(is, *fmt);
|
||||
|
Reference in New Issue
Block a user