mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-30 00:14:26 +00:00
Copy known transferred amount back to buffer for usb reads instead of requested length.
This commit is contained in:
parent
b5dfb8f03e
commit
38d9c24e56
@ -2483,7 +2483,7 @@ usb_bulk_transfer(struct libusb_device_handle *dev_handle, int intinfo,
|
|||||||
} while (err && ++retries < USB_RETRY_MAX);
|
} while (err && ++retries < USB_RETRY_MAX);
|
||||||
}
|
}
|
||||||
if ((endpoint & LIBUSB_ENDPOINT_DIR_MASK) == LIBUSB_ENDPOINT_IN)
|
if ((endpoint & LIBUSB_ENDPOINT_DIR_MASK) == LIBUSB_ENDPOINT_IN)
|
||||||
memcpy(data, buf, length);
|
memcpy(data, buf, *transferred);
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user