Skip to content

Commit

Permalink
format-inl.h: address implicit int to bool conversion (#3446)
Browse files Browse the repository at this point in the history
  • Loading branch information
adesitter authored May 17, 2023
1 parent 616a493 commit 2117df2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fmt/format-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1458,7 +1458,7 @@ FMT_FUNC bool write_console(std::FILE* f, string_view text) {
auto u16 = utf8_to_utf16(text);
auto written = dword();
return WriteConsoleW(reinterpret_cast<void*>(_get_osfhandle(fd)), u16.c_str(),
static_cast<uint32_t>(u16.size()), &written, nullptr);
static_cast<uint32_t>(u16.size()), &written, nullptr) != 0;
}

// Print assuming legacy (non-Unicode) encoding.
Expand Down

0 comments on commit 2117df2

Please sign in to comment.