summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Batard <pbatard@gmail.com>2010-02-26 13:22:09 +0000
committerPete Batard <pbatard@gmail.com>2010-02-26 13:22:09 +0000
commitf7c451a30cf774e86f9e3455d82568564e9812b1 (patch)
tree52a7c7d41a3477f80a901d13efd59310415cd21e
parentbdeed5cbbb098cc4a3157216a142d187dfca9712 (diff)
downloadlibusb-f7c451a30cf774e86f9e3455d82568564e9812b1.tar.gz
fixed issue with DYNAMIC_FDS (Jere Knaappila)r180
-rw-r--r--libusb/os/windows_compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libusb/os/windows_compat.c b/libusb/os/windows_compat.c
index d7db3c4..d9a2134 100644
--- a/libusb/os/windows_compat.c
+++ b/libusb/os/windows_compat.c
@@ -721,7 +721,7 @@ int usbi_poll(struct pollfd *fds, unsigned int nfds, int timeout)
object_index = ret-WAIT_OBJECT_0;
if ((object_index >= 0) && ((DWORD)object_index < nb_handles_to_wait_on)) {
#if defined(DYNAMIC_FDS)
- if ((DWORD)object_index == nb_handles_to_wait_on) {
+ if ((DWORD)object_index == (nb_handles_to_wait_on-1)) {
// Detected fd update while we were waiting
// => flag a poll interruption
errno = EINTR;