diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index 1d9a9e74..983ce9ec 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1351,7 +1351,7 @@ FMT_FUNC void vprint(std::FILE* f, string_view format_str, format_args args) { internal::utf8_to_utf16 u16(string_view(buffer.data(), buffer.size())); auto written = DWORD(); if (!WriteConsoleW(reinterpret_cast(_get_osfhandle(fd)), - u16.c_str(), u16.size(), &written, nullptr)) { + u16.c_str(), static_cast(u16.size()), &written, nullptr)) { throw format_error("failed to write to console"); } return;