Calls to std::tolower/toupper should cast their argument to an unsigned char.

[SVN r28504]
This commit is contained in:
John Maddock
2005-04-27 15:49:30 +00:00
parent ed93c55832
commit b04bc5b5b0

View File

@ -262,12 +262,12 @@ BOOST_REGEX_DECL std::string BOOST_REGEX_CALL lookup_default_collate_name(const
BOOST_REGEX_DECL char BOOST_REGEX_CALL global_lower(char c)
{
return static_cast<char>((std::tolower)(c));
return static_cast<char>((std::tolower)((unsigned char)c));
}
BOOST_REGEX_DECL char BOOST_REGEX_CALL global_upper(char c)
{
return static_cast<char>((std::toupper)(c));
return static_cast<char>((std::toupper)((unsigned char)c));
}
#ifndef BOOST_NO_WREGEX
BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL global_lower(wchar_t c)