From ef493d4489e5d23a610954d138d2a5bec976915e Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Thu, 22 Jun 2017 09:40:11 -0700 Subject: [PATCH] Fix narrowing in static_ostream --- CHANGELOG.md | 1 + include/beast/core/detail/static_ostream.hpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cf1ddac..2b01b99b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ Version 65: * Enable narrowing warning on msvc cmake * Fix integer types in deflate_stream::bi_reverse +* Fix narrowing in static_ostream -------------------------------------------------------------------------------- diff --git a/include/beast/core/detail/static_ostream.hpp b/include/beast/core/detail/static_ostream.hpp index d64e41b8..f0f6b3d1 100644 --- a/include/beast/core/detail/static_ostream.hpp +++ b/include/beast/core/detail/static_ostream.hpp @@ -57,7 +57,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;