summaryrefslogtreecommitdiff
path: root/libc/stdio/fread.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdio/fread.c')
-rw-r--r--libc/stdio/fread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/stdio/fread.c b/libc/stdio/fread.c
index d2fcc70..5df33b4 100644
--- a/libc/stdio/fread.c
+++ b/libc/stdio/fread.c
@@ -15,7 +15,7 @@ size_t fread_unlocked(void * __restrict ptr, size_t size, size_t nmemb,
FILE * __restrict stream)
{
__STDIO_STREAM_VALIDATE(stream);
- assert(stream->__filedes >= -1);
+ assert(stream->__filedes >= -2);
/* Note: If nmbem * size > SIZE_MAX then there is an application
* bug since no array can be larger than SIZE_MAX in size. */