From 932a0646ce4101031c896a96cd14c2b2081f06ce Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Tue, 4 Dec 2018 21:55:45 +0900 Subject: [PATCH] force clamping character code in [0,256) --- toml/combinator.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toml/combinator.hpp b/toml/combinator.hpp index a81eeed..4c69093 100644 --- a/toml/combinator.hpp +++ b/toml/combinator.hpp @@ -22,7 +22,7 @@ namespace detail // to output character as an error message. inline std::string show_char(const char c) { - if(std::isgraph(c)) + if(std::isgraph(*reinterpret_cast(std::addressof(c)))) { return std::string(1, c); }