summaryrefslogtreecommitdiff
path: root/userland/libc/stdio/fgetc.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-06-22 21:41:46 +0200
committerAnton Kling <anton@kling.gg>2024-06-22 21:41:46 +0200
commit5fbd9b519e082fc235a8a57c6cf761e6cefbfb62 (patch)
treed9df62f8bf6ed6b17a7b61aa77f61da9d097c5ff /userland/libc/stdio/fgetc.c
parent5e10cdd5b4aa7486208dd14ebef4254ec5b5d03a (diff)
LibC: Fix bugs relating to fseek
Diffstat (limited to 'userland/libc/stdio/fgetc.c')
-rw-r--r--userland/libc/stdio/fgetc.c1
1 files changed, 1 insertions, 0 deletions
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;