summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-23 15:38:44 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-23 15:38:44 +0000
commit94f40186c0b576b4e4ead89d369712990285baa1 (patch)
tree598ab90f70379273988826959ec3399bb4bf41c2 /io.c
parent5aadcd934937f0898fdd3d9bbec3550f65598b98 (diff)
* io.c (rb_io_fread): may lose data on nonblocking read.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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;
}