From 893fef3fcfec12a9ac3750243637e5eac1332303 Mon Sep 17 00:00:00 2001 From: Heikki Hannikainen Date: Tue, 24 Feb 2015 01:25:58 +0200 Subject: [PATCH] Bug fix, open the correct device in hackrf_device_list_open --- host/libhackrf/src/hackrf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/host/libhackrf/src/hackrf.c b/host/libhackrf/src/hackrf.c index 8c83298a..42d69c83 100644 --- a/host/libhackrf/src/hackrf.c +++ b/host/libhackrf/src/hackrf.c @@ -485,7 +485,9 @@ int ADDCALL hackrf_device_list_open(hackrf_device_list_t *list, int idx, hackrf_ return HACKRF_ERROR_INVALID_PARAM; } - if( libusb_open(list->usb_devices[idx], &usb_device) != 0 ) { + int i = list->usb_device_index[idx]; + + if( libusb_open(list->usb_devices[i], &usb_device) != 0 ) { usb_device = NULL; return HACKRF_ERROR_LIBUSB; }