From 7b1eb6e6e3b44cb69d0b722e4af7889097bbb009 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Sat, 30 Oct 2021 17:23:31 +0200 Subject: [PATCH] bmp_libusb: reset type on every device. --- src/platforms/hosted/bmp_libusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/hosted/bmp_libusb.c b/src/platforms/hosted/bmp_libusb.c index 5dbfcb7..b14dce0 100644 --- a/src/platforms/hosted/bmp_libusb.c +++ b/src/platforms/hosted/bmp_libusb.c @@ -155,7 +155,6 @@ int find_debuggers(BMP_CL_OPTIONS_t *cl_opts,bmp_info_t *info) char *active_cable = NULL; bool ftdi_unknown = false; rescan: - type = BMP_TYPE_NONE; found_debuggers = 0; serial[0] = 0; manufacturer[0] = 0; @@ -164,6 +163,7 @@ int find_debuggers(BMP_CL_OPTIONS_t *cl_opts,bmp_info_t *info) active_cable = NULL; ftdi_unknown = false; for (int i = 0; devs[i]; i++) { + type = BMP_TYPE_NONE; libusb_device *dev = devs[i]; int res = libusb_get_device_descriptor(dev, &desc); if (res < 0) {