diff options
Diffstat (limited to 'heimdall/source/BridgeManager.cpp')
-rw-r--r-- | heimdall/source/BridgeManager.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/heimdall/source/BridgeManager.cpp b/heimdall/source/BridgeManager.cpp index 1065795..b7bff3d 100644 --- a/heimdall/source/BridgeManager.cpp +++ b/heimdall/source/BridgeManager.cpp @@ -650,6 +650,14 @@ bool BridgeManager::SendBulkTransfer(unsigned char *data, int length, int timeou int BridgeManager::ReceiveBulkTransfer(unsigned char *data, int length, int timeout, bool retry) const { + if (data == nullptr) + { + // HACK: It seems WinUSB ignores us when we try to read with length zero. + static unsigned char dummyData; + data = &dummyData; + length = 1; + } + int dataTransferred; int result = libusb_bulk_transfer(deviceHandle, inEndpoint, data, length, &dataTransferred, timeout); |