diff --git a/include/spdlog/sinks/wincolor_sink-inl.h b/include/spdlog/sinks/wincolor_sink-inl.h index 092c7655..e2676d3c 100644 --- a/include/spdlog/sinks/wincolor_sink-inl.h +++ b/include/spdlog/sinks/wincolor_sink-inl.h @@ -134,7 +134,7 @@ std::uint16_t SPDLOG_INLINE wincolor_sink::set_foreground_color_(s // change only the foreground bits (lowest 4 bits) auto new_attribs = static_cast(attribs) | (orig_buffer_info.wAttributes & 0xfff0); - auto ignored = ::SetConsoleTextAttribute(static_cast(out_handle_), new_attribs); + auto ignored = ::SetConsoleTextAttribute(static_cast(out_handle_), static_cast(new_attribs)); (void)(ignored); return static_cast(orig_buffer_info.wAttributes); // return orig attribs }