1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* win32/win32.c (rb_w32_fdisset): check whether the handle is valid.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2004-12-15 05:32:53 +00:00
parent 6982d10a7e
commit f598caf621
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Wed Dec 15 14:32:18 2004 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (rb_w32_fdisset): check whether the handle is valid.
Tue Dec 14 19:17:15 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
* utf8.c (utf8_is_mbc_ambiguous): [ruby-talk:123561]

View file

@ -1827,7 +1827,12 @@ rb_w32_fdclr(int fd, fd_set *set)
int
rb_w32_fdisset(int fd, fd_set *set)
{
return __WSAFDIsSet(TO_SOCKET(fd), set);
int ret;
SOCKET s = TO_SOCKET(fd);
if (s == (SOCKET)INVALID_HANDLE_VALUE)
return 0;
RUBY_CRITICAL(ret = __WSAFDIsSet(s, set));
return ret;
}
//