summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 9e5758f..baf62b9 100644
--- a/libc/stdio/fread.c
+++ b/libc/stdio/fread.c
@@ -83,7 +83,7 @@ fread(void *buf, size_t size, size_t count, FILE *fp)
/*
* Copy data out of the buffer.
*/
- size_t buffered_bytes = MIN(fp->_r, total);
+ size_t buffered_bytes = MIN((size_t) fp->_r, total);
memcpy(dst, fp->_p, buffered_bytes);
fp->_p += buffered_bytes;
fp->_r -= buffered_bytes;