Skip to content

Commit

Permalink
(wincrt) output all content when overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MacroModel committed Nov 27, 2024
1 parent af7d6fd commit 8552caa
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions include/fast_io_legacy_impl/c/wincrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,8 @@ inline void wincrt_fp_overflow_impl(FILE *__restrict fpp, char_type ch)
}
else
{
// output existing content
::fast_io::details::posix_write_bytes_impl(fp->_file, reinterpret_cast<::std::byte const *>(fp->_base), reinterpret_cast<::std::byte const *>(fp->_ptr));
// ?? output all content ??
// ::fast_io::details::posix_write_bytes_impl(fp->_file, reinterpret_cast<::std::byte const *>(fp->_base), reinterpret_cast<::std::byte const *>(fp->_base + fp->_bufsiz));
// output all content
::fast_io::details::posix_write_bytes_impl(fp->_file, reinterpret_cast<::std::byte const *>(fp->_base), reinterpret_cast<::std::byte const *>(fp->_base + fp->_bufsiz));
}
fp->_ptr = fp->_base;
my_memcpy(fp->_ptr, __builtin_addressof(ch), sizeof(ch));
Expand Down

0 comments on commit 8552caa

Please sign in to comment.