Flush stdout before changing mode back to text (#5477)

This commit is contained in:
Jesse Natalie 2023-11-15 09:02:00 -08:00 committed by GitHub
parent 560eea6d75
commit fb91e6f0eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -144,6 +144,7 @@ class OutputFile {
~OutputFile() {
if (fp_ == stdout) {
fflush(stdout);
SET_STDOUT_MODE(old_mode_);
} else if (fp_ != nullptr) {
fclose(fp_);