diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b01b99b..302573c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ Version 65: * Enable narrowing warning on msvc cmake * Fix integer types in deflate_stream::bi_reverse * Fix narrowing in static_ostream +* Fix narrowing in ostream -------------------------------------------------------------------------------- diff --git a/include/beast/core/detail/ostream.hpp b/include/beast/core/detail/ostream.hpp index 1fafffe7..c0221124 100644 --- a/include/beast/core/detail/ostream.hpp +++ b/include/beast/core/detail/ostream.hpp @@ -105,7 +105,8 @@ public: { if(! Traits::eq_int_type(ch, Traits::eof())) { - Traits::assign(*this->pptr(), ch); + Traits::assign(*this->pptr(), + static_cast(ch)); flush(1); prepare(); return ch; @@ -185,7 +186,8 @@ public: { if(! Traits::eq_int_type(ch, Traits::eof())) { - Traits::assign(*this->pptr(), ch); + Traits::assign(*this->pptr(), + static_cast(ch)); flush(1); prepare(); return ch;