Skip to content

Commit

Permalink
Merge pull request #977 from MacroModel/master
Browse files Browse the repository at this point in the history
Fix pointer error for wincrt.h
  • Loading branch information
MacroModel authored Nov 27, 2024
2 parents 30ef50b + 2c929d9 commit fca2abd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/fast_io_legacy_impl/c/wincrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ inline void wincrt_fp_write_cold_normal_case_impl(FILE *__restrict fpp, char con
{
crt_iobuf *fp{reinterpret_cast<crt_iobuf *>(fpp)};
::std::size_t remain{static_cast<::std::size_t>(static_cast<::std::uint_least32_t>(fp->_cnt))};
if (diff < remain)
{
remain = diff;
}
non_overlapped_copy_n(first, remain, fp->_ptr);
diff -= remain;
first += remain;
Expand Down

0 comments on commit fca2abd

Please sign in to comment.