1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:07:35 +00:00

LibC: Clear any ungetc()'ed data in fflush()

This commit is contained in:
Andreas Kling 2019-09-27 09:32:43 +02:00
parent 9470db92f4
commit 676af444ca

View file

@ -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;