From cd5200d62b26d33a94ef9ad856707c44bd6cf192 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Thu, 25 Feb 2010 20:25:54 +0000 Subject: fixed small issue when HID get feature is not available --- libusb/os/windows_usb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libusb/os/windows_usb.c') diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c index 3f404a8..4c21f7c 100644 --- a/libusb/os/windows_usb.c +++ b/libusb/os/windows_usb.c @@ -3174,9 +3174,11 @@ static int _hid_get_feature(struct hid_device_priv* dev, HANDLE hid_handle, int switch (err) { case ERROR_INVALID_FUNCTION: r = LIBUSB_ERROR_NOT_FOUND; + break; default: - usbi_dbg("error %s", windows_error_str(r)); + usbi_dbg("error %s", windows_error_str(err)); r = LIBUSB_ERROR_OTHER; + break; } } safe_free(buf); -- cgit v1.2.1