Fix incorrect condition for pendig-IO

This commit is contained in:
Takashi Sogabe
2013-06-26 15:24:23 +09:00
parent 5625e44371
commit 4f3a749da1
+1 -1
View File
@@ -612,7 +612,7 @@ mrb_io_s_select(mrb_state *mrb, mrb_value klass)
read_io = RARRAY_PTR(read)[i];
fptr = (struct mrb_io *)mrb_get_datatype(mrb, read_io, &mrb_io_type);
FD_SET(fptr->fd, rp);
if (!mrb_io_read_data_pending(mrb, read_io)) {
if (mrb_io_read_data_pending(mrb, read_io)) {
pending++;
FD_SET(fptr->fd, &pset);
}