From 99fa0f3273d36991da4a1cc7745359ddf6274408 Mon Sep 17 00:00:00 2001 From: CLARATION Date: Thu, 25 Jun 2026 22:06:01 -0700 Subject: [PATCH] fix(usb): check for success on config (oops) --- src/usb/usb_libusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/usb/usb_libusb.c b/src/usb/usb_libusb.c index 217f91a..3de153a 100644 --- a/src/usb/usb_libusb.c +++ b/src/usb/usb_libusb.c @@ -23,7 +23,7 @@ bool wait_usb_handle(usb_handle_t *handle) { if(libusb_init(NULL) == LIBUSB_SUCCESS) { for(;;) { if((handle->device = libusb_open_device_with_vid_pid(NULL, handle->vid, handle->pid)) != NULL) { - if(libusb_set_configuration(handle->device, 1)) { + if(libusb_set_configuration(handle->device, 1) == LIBUSB_SUCCESS) { return true; } libusb_close(handle->device);