summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libusb/os/windows_usb.c9
-rw-r--r--libusb/os/windows_usb.h2
2 files changed, 3 insertions, 8 deletions
diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c
index d26f01f..f41f064 100644
--- a/libusb/os/windows_usb.c
+++ b/libusb/os/windows_usb.c
@@ -832,13 +832,8 @@ static int cache_config_descriptors(struct libusb_device *dev, HANDLE hub_handle
LOOP_BREAK(LIBUSB_ERROR_IO);
}
- usbi_dbg("cached config descriptor #%d (%d bytes)", i+1, cd_data->wTotalLength);
-
- // Sanity check. Ensures that indexes for our list of config desc is in the right order
- if (i != (cd_data->bConfigurationValue-1)) {
- usbi_warn(ctx, "program assertion failed - config descriptors are being read out of order");
- continue;
- }
+ usbi_dbg("cached config descriptor %d (bConfigurationValue=%d, %d bytes)",
+ i, cd_data->bConfigurationValue, cd_data->wTotalLength);
// Cache the descriptor
priv->config_descriptor[i] = malloc(cd_data->wTotalLength);
diff --git a/libusb/os/windows_usb.h b/libusb/os/windows_usb.h
index b2e9bd6..2353488 100644
--- a/libusb/os/windows_usb.h
+++ b/libusb/os/windows_usb.h
@@ -468,7 +468,7 @@ typedef struct _USB_INTERFACE_DESCRIPTOR {
typedef struct _USB_CONFIGURATION_DESCRIPTOR {
UCHAR bLength;
UCHAR bDescriptorType;
- USHORT wTotalLength;
+ USHORT wTotalLength;
UCHAR bNumInterfaces;
UCHAR bConfigurationValue;
UCHAR iConfiguration;