diff --git a/libs/libc/src/file.cpp b/libs/libc/src/file.cpp index d8091b5a..af14e3fc 100644 --- a/libs/libc/src/file.cpp +++ b/libs/libc/src/file.cpp @@ -176,8 +176,12 @@ extern "C" { stream->f_bufoff--; stream->f_buf[stream->f_bufoff] = (char)c; + return c; + } + else + { + return EOF; // FIXME: Handle this case properly. } - else { NOT_IMPLEMENTED("ungetc with buffer that has not been read"); } } int ferror(FILE* stream)