From 99b340a6d0c706c05d5daee5a7ee040556829349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Wed, 1 May 2019 16:58:43 +0200 Subject: [PATCH] Externals/libusb: Mask index for control transfers correctly --- Externals/libusb/libusb/os/windows_winusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Externals/libusb/libusb/os/windows_winusb.c b/Externals/libusb/libusb/os/windows_winusb.c index 423fb3dcd7..e18a723a55 100644 --- a/Externals/libusb/libusb/os/windows_winusb.c +++ b/Externals/libusb/libusb/os/windows_winusb.c @@ -2474,7 +2474,7 @@ static int winusbx_submit_control_transfer(int sub_api, struct usbi_transfer *it return LIBUSB_ERROR_INVALID_PARAM; if ((setup->RequestType & 0x1F) == LIBUSB_RECIPIENT_INTERFACE) - current_interface = check_valid_interface(transfer->dev_handle, setup->Index, USB_API_WINUSBX); + current_interface = check_valid_interface(transfer->dev_handle, setup->Index & 0xff, USB_API_WINUSBX); else current_interface = get_valid_interface(transfer->dev_handle, USB_API_WINUSBX); if (current_interface < 0) {