From 4ebd9ec1b0adf6c761b41b0be7542d5fbcb57817 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sat, 24 Oct 2020 14:48:24 +0100 Subject: [PATCH] Pass correct parameter when retrieving device number in Windows. --- win32/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win32/usb.c b/win32/usb.c index 05b4164..3136aac 100644 --- a/win32/usb.c +++ b/win32/usb.c @@ -594,7 +594,7 @@ UsbDevice_t* FindDrivePath(DeviceContext* ctx, GUID deviceGuid) // We start by getting the unique DeviceNumber of the given // DriveLetter. We'll use this later to find a matching // DevicePath "symbolic name" - DWORD devNum = GetDeviceNumber(ctx->handle); + DWORD devNum = GetDeviceNumber(ctx->device_path); return devNum < 0 ? NULL : FindDeviceNumber(devNum, deviceGuid); }