Skip to content

Commit

Permalink
Merge pull request #205 from rulerofthehuns/master
Browse files Browse the repository at this point in the history
fix output on windows #204
  • Loading branch information
bombela authored Mar 31, 2021
2 parents f6f7253 + 04efb6f commit 1205a49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backward.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3834,7 +3834,7 @@ class cfile_streambuf : public std::streambuf {
cfile_streambuf(FILE *_sink) : sink(_sink) {}
int_type underflow() override { return traits_type::eof(); }
int_type overflow(int_type ch) override {
if (traits_type::not_eof(ch) && fwrite(&ch, sizeof ch, 1, sink) == 1) {
if (traits_type::not_eof(ch) && fputc(ch, sink) != EOF) {
return ch;
}
return traits_type::eof();
Expand Down

0 comments on commit 1205a49

Please sign in to comment.