diff --git a/lib/usb.c b/lib/usb.c index 625c74f..c8e4790 100644 --- a/lib/usb.c +++ b/lib/usb.c @@ -38,10 +38,10 @@ usb_dev_handle *open_usb(uint16_t default_vendor, uint16_t default_product) for (bus = usb_get_busses(); bus; bus = bus->next) for (dev = bus->devices; dev; dev = dev->next) { if (dev->descriptor.idVendor != - vendor ? vendor : default_vendor) + (vendor ? vendor : default_vendor)) continue; if (dev->descriptor.idProduct != - product ? product : default_product) + (product ? product : default_product)) continue; handle = usb_open(dev); #ifdef DO_FULL_USB_BUREAUCRACY