Files
archived-ext-libusb/libusb
Matthijs Lavrijsen 467b6a8896 winusb: Fix winusb_get_device_list() failing to find port numbers
Fix recent regression introduced in commit 9d595d4.

get_dev_port_number() was always returning port number 0 for any port,
due to the incorrect assumption that strtoll's 'end' pointer will point
to a null terminator on success. This was causing
winusb_get_device_list() to always fail. Since we actually know the
expected values of *end for both the SPDRP_LOCATION_INFORMATION and the
SPDRP_LOCATION_PATHS case, check for those instead.

Additionally, document why a return value of 0 is treated as a failure
in this particular function, for valid but somewhat coincidental reasons
that may not be immediately obvious.

Closes #1544
2024-07-31 00:05:01 +02:00
..
2024-05-26 23:10:24 +02:00
2024-01-31 23:11:14 +01:00