Pass correct parameter when retrieving device number in Windows.

This commit is contained in:
2020-10-24 14:48:24 +01:00
parent 91c8e2bdb9
commit 4ebd9ec1b0

View File

@@ -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);
}