summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index 5b9e095a58..674877c466 100644
--- a/io.c
+++ b/io.c
@@ -710,7 +710,7 @@ rb_io_fread(ptr, len, f)
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
case EWOULDBLOCK:
#endif
- if (len - n > 0) {
+ if (len - n >= 0) {
clearerr(f);
return len - n;
}