Commit | Line | Data |
---|---|---|
6623bd82 RW |
1 | diff --git a/libusb/descriptor.c b/libusb/descriptor.c |
2 | index 74d6de5..0b0e314 100644 | |
3 | --- a/libusb/descriptor.c | |
4 | +++ b/libusb/descriptor.c | |
5 | @@ -1174,7 +1174,7 @@ int API_EXPORTED libusb_get_string_descriptor_ascii(libusb_device_handle *dev_ha | |
d991b056 RW |
6 | return LIBUSB_ERROR_IO; |
7 | ||
8 | if (tbuf[0] > r) | |
9 | - return LIBUSB_ERROR_IO; | |
b0a4b6d9 | 10 | + tbuf[0] = r; |
d991b056 | 11 | |
b0a4b6d9 RW |
12 | di = 0; |
13 | for (si = 2; si < tbuf[0]; si += 2) { | |
6623bd82 RW |
14 | -- |
15 | 2.17.0 | |
16 |