diff --git a/src/fprint.hpp b/src/fprint.hpp index b494fb5..816c114 100644 --- a/src/fprint.hpp +++ b/src/fprint.hpp @@ -42,7 +42,7 @@ namespace swbf { if(file == stderr) handle = GetStdHandle(STD_ERROR_HANDLE); - WriteConsole(handle, str.data(), str.length(), nullptr, nullptr); + WriteFile(handle, str.data(), static_cast(str.length()), nullptr, nullptr); #else std::vformat_to(FputcIterator(file), format, std::make_format_args(args...)); #endif