summaryrefslogtreecommitdiff
path: root/userland/libc/stdio/ungetc.c
diff options
context:
space:
mode:
Diffstat (limited to 'userland/libc/stdio/ungetc.c')
-rw-r--r--userland/libc/stdio/ungetc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/userland/libc/stdio/ungetc.c b/userland/libc/stdio/ungetc.c
index 8d649bc..3b93b70 100644
--- a/userland/libc/stdio/ungetc.c
+++ b/userland/libc/stdio/ungetc.c
@@ -5,5 +5,6 @@ int ungetc(int c, FILE *stream) {
return EOF;
stream->buffered_char = c;
stream->has_buffered_char = 1;
+ fseek(stream, -1, SEEK_CUR);
return c;
}