diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-09-27 09:32:43 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-27 10:15:42 +0200 |
commit | 676af444ca80cc9885ba9b1950e5179aeb4fb4fa (patch) | |
tree | bbd81d7ccadc526d01094d7d2285f3acbc888cf2 /Libraries/LibC/stdio.cpp | |
parent | 9470db92f47ce79ad18c3476561119d428f81c65 (diff) | |
download | serenity-676af444ca80cc9885ba9b1950e5179aeb4fb4fa.zip |
LibC: Clear any ungetc()'ed data in fflush()
Diffstat (limited to 'Libraries/LibC/stdio.cpp')
-rw-r--r-- | Libraries/LibC/stdio.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibC/stdio.cpp b/Libraries/LibC/stdio.cpp index 6161d21c7c..c6cbddd4db 100644 --- a/Libraries/LibC/stdio.cpp +++ b/Libraries/LibC/stdio.cpp @@ -96,6 +96,8 @@ int fflush(FILE* stream) stream->buffer_index = 0; stream->error = 0; stream->eof = 0; + stream->have_ungotten = false; + stream->ungotten = 0; if (rc < 0) { stream->error = errno; return EOF; |