mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:57:36 +00:00
LibC: Clear any ungetc()'ed data in fflush()
This commit is contained in:
parent
9470db92f4
commit
676af444ca
1 changed files with 2 additions and 0 deletions
|
@ -96,6 +96,8 @@ int fflush(FILE* stream)
|
||||||
stream->buffer_index = 0;
|
stream->buffer_index = 0;
|
||||||
stream->error = 0;
|
stream->error = 0;
|
||||||
stream->eof = 0;
|
stream->eof = 0;
|
||||||
|
stream->have_ungotten = false;
|
||||||
|
stream->ungotten = 0;
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
stream->error = errno;
|
stream->error = errno;
|
||||||
return EOF;
|
return EOF;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue