From 5fbd9b519e082fc235a8a57c6cf761e6cefbfb62 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Sat, 22 Jun 2024 21:41:46 +0200 Subject: LibC: Fix bugs relating to fseek --- userland/libc/stdio/fgetc.c | 1 + 1 file changed, 1 insertion(+) (limited to 'userland/libc/stdio/fgetc.c') diff --git a/userland/libc/stdio/fgetc.c b/userland/libc/stdio/fgetc.c index c69211f..afa299f 100644 --- a/userland/libc/stdio/fgetc.c +++ b/userland/libc/stdio/fgetc.c @@ -4,6 +4,7 @@ int fgetc(FILE *stream) { if (stream->has_buffered_char) { stream->has_buffered_char = 0; + fseek(stream, 1, SEEK_CUR); return stream->buffered_char; } char c; -- cgit v1.2.3