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:
Christopher Blaesius authored and Howard Hinnant committed 2018-06-11 17:00:45 -04:00
1 parent 0197889505
commit 07876e4433
1 file changed
+1 -1
+1 -1
View File
@@ -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);