Skip to content

Commit

Permalink
Flush stdout before changing mode back to text (#5477)
Browse files Browse the repository at this point in the history
  • Loading branch information
jenatali committed Nov 15, 2023
1 parent 560eea6 commit fb91e6f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/io.h
Expand Up @@ -144,6 +144,7 @@ class OutputFile {

~OutputFile() {
if (fp_ == stdout) {
fflush(stdout);
SET_STDOUT_MODE(old_mode_);
} else if (fp_ != nullptr) {
fclose(fp_);
Expand Down

0 comments on commit fb91e6f

Please sign in to comment.