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