Skip to content

Commit

Permalink
Fix flush
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut authored and happymonkey1 committed Apr 6, 2024
1 parent cd71796 commit c61190f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/fmt/format-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1503,7 +1503,7 @@ template <typename F> class apple_file : public file_base<F> {
auto get_write_buffer() const -> span<char> {
if (!this->file_->_p || offset() == this->file_->_bf._size) {
// Force buffer initialization by placing and removing a char in a buffer.
fputc(0, this->file_);
putc_unlocked(0, this->file_);
--this->file_->_p;
++this->file_->_w;
}
Expand Down Expand Up @@ -1571,6 +1571,7 @@ class file_print_buffer : public buffer<char> {
static void grow(buffer<char>& buf, size_t) {
auto& self = static_cast<file_print_buffer&>(buf);
self.set_buffer();
self.clear();
}

public:
Expand Down

0 comments on commit c61190f

Please sign in to comment.