mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-17 17:58:09 +08:00
force clamping character code in [0,256)
This commit is contained in:
@@ -22,7 +22,7 @@ namespace detail
|
|||||||
// to output character as an error message.
|
// to output character as an error message.
|
||||||
inline std::string show_char(const char c)
|
inline std::string show_char(const char c)
|
||||||
{
|
{
|
||||||
if(std::isgraph(c))
|
if(std::isgraph(*reinterpret_cast<unsigned char const*>(std::addressof(c))))
|
||||||
{
|
{
|
||||||
return std::string(1, c);
|
return std::string(1, c);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user