Fix usbhid-dump SIGSEGV on #100

This commit is contained in:
pixl
2020-07-13 15:12:28 -04:00
parent dde2993223
commit 0f60c3896c
2 changed files with 6 additions and 2 deletions

View File

@@ -262,6 +262,9 @@ std::vector<uint8_t> RawDevice::_respondToReport
throw TimeoutError();
_readReport(response, MAX_DATA_LENGTH, timeout);
if(!_continue_respond)
throw TimeoutError();
// All reports have the device index at byte 2
if(response[1] != request[1]) {
if(_continue_listen)