diff options
Diffstat (limited to 'src/lib/libc/stdio.c')
-rw-r--r-- | src/lib/libc/stdio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/libc/stdio.c b/src/lib/libc/stdio.c index bfa2f74..df30e08 100644 --- a/src/lib/libc/stdio.c +++ b/src/lib/libc/stdio.c @@ -215,7 +215,7 @@ size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream) { stream->pos += ret; } - if (ret < size * nmemb) { + if (ret < size * nmemb || stream->pos >= stream->st.size) { stream->flags |= STDIO_FL_EOF; } |