From 37d76b961c47c98862f66666d36921092e36e2b4 Mon Sep 17 00:00:00 2001 From: gabime Date: Tue, 16 Mar 2021 23:39:55 +0200 Subject: [PATCH] Fix #1876 --- include/spdlog/sinks/wincolor_sink-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }