diff --git a/include/spdlog/sinks/wincolor_sink.h b/include/spdlog/sinks/wincolor_sink.h index e73a1ae3..5555d801 100644 --- a/include/spdlog/sinks/wincolor_sink.h +++ b/include/spdlog/sinks/wincolor_sink.h @@ -54,7 +54,7 @@ public: { auto color = colors_[msg.level]; auto orig_attribs = set_console_attribs(color); - WriteConsoleA(out_handle_, msg.formatted.data(), msg.formatted.size(), nullptr, nullptr); + WriteConsoleA(out_handle_, msg.formatted.data(), static_cast(msg.formatted.size()), nullptr, nullptr); SetConsoleTextAttribute(out_handle_, orig_attribs); //reset to orig colors } @@ -113,4 +113,4 @@ typedef wincolor_stderr_sink wincolor_stderr_sink_mt; typedef wincolor_stderr_sink wincolor_stderr_sink_st; } -} \ No newline at end of file +}