Index: src/OFKernelEventObserver_select.m ================================================================== --- src/OFKernelEventObserver_select.m +++ src/OFKernelEventObserver_select.m @@ -102,12 +102,17 @@ { /* TODO: Adjust _maxFD */ int fd = [object fileDescriptorForReading]; - if (fd < 0 || fd >= FD_SETSIZE) + if (fd < 0) + @throw [OFOutOfRangeException exception]; + +#ifndef _WIN32 + if (fd >= FD_SETSIZE) @throw [OFOutOfRangeException exception]; +#endif FD_CLR(fd, &_readFDs); } - (void)OF_removeObjectForWriting: (id)object @@ -114,12 +119,17 @@ { /* TODO: Adjust _maxFD */ int fd = [object fileDescriptorForWriting]; - if (fd < 0 || fd >= FD_SETSIZE) + if (fd < 0) + @throw [OFOutOfRangeException exception]; + +#ifndef _WIN32 + if (fd >= FD_SETSIZE) @throw [OFOutOfRangeException exception]; +#endif FD_CLR(fd, &_writeFDs); } - (void)observeForTimeInterval: (of_time_interval_t)timeInterval