From f7c451a30cf774e86f9e3455d82568564e9812b1 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 26 Feb 2010 13:22:09 +0000 Subject: fixed issue with DYNAMIC_FDS (Jere Knaappila) --- libusb/os/windows_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.1