Skip to content

Commit

Permalink
Flush stdout before changing mode back to text (KhronosGroup#5477)
Browse files Browse the repository at this point in the history
  • Loading branch information
jenatali authored and sajjadmirzanv committed Nov 15, 2023
1 parent 7a059b7 commit abba170
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/io.h
Original file line number Diff line number Diff line change
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 abba170

Please sign in to comment.