Merge pull request #258 from MartinNowak/master

fix missing error msg when no suitable device is found
pull/263/head
texane 2014-08-21 07:20:03 +02:00
commit 8c87483cb4
1 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

@ -770,8 +770,7 @@ stlink_t* stlink_open_usb(const int verbose, int reset) {
devAddr=atoi(c); devAddr=atoi(c);
ILOG("bus %03d dev %03d\n",devBus, devAddr); ILOG("bus %03d dev %03d\n",devBus, devAddr);
} }
while (cnt){ while (cnt--){
cnt--;
libusb_get_device_descriptor( list[cnt], &desc ); libusb_get_device_descriptor( list[cnt], &desc );
if (desc.idVendor!=USB_ST_VID) continue; if (desc.idVendor!=USB_ST_VID) continue;
if (devBus && devAddr) if (devBus && devAddr)