]> sigrok.org Git - libsigrok.git/commitdiff
hantek-6xxx: Fix the device scan to not scan the NULL entry.
authorMike Meyer <redacted>
Mon, 11 Jul 2016 16:09:04 +0000 (11:09 -0500)
committerUwe Hermann <redacted>
Sun, 21 Aug 2016 16:53:55 +0000 (18:53 +0200)
src/hardware/hantek-6xxx/api.c

index cbcd15bf65ea918038eef5cb3c9513ef155252d6..c3f3d881fd970f2ecff220e088252c224d4a1b37 100644 (file)
@@ -219,7 +219,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                usb_get_port_path(devlist[i], connection_id, sizeof(connection_id));
 
                prof = NULL;
-               for (j = 0; j < (int)ARRAY_SIZE(dev_profiles); j++) {
+               for (j = 0; dev_profiles[j].orig_vid; j++) {
                        if (des.idVendor == dev_profiles[j].orig_vid
                                && des.idProduct == dev_profiles[j].orig_pid) {
                                /* Device matches the pre-firmware profile. */