Skip to content

Commit

Permalink
Fix report not being read fully.
Browse files Browse the repository at this point in the history
  • Loading branch information
71 committed Nov 13, 2020
1 parent 48534c3 commit 9c885f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hid.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,11 @@ func (d *winDevice) readThread() {
if buf[0] == 0 {
// Report numbers are not being used, so remove zero to match other platforms
buf = buf[1:]
n--
}

select {
case d.readCh <- buf[:int(n-1)]:
case d.readCh <- buf[:int(n)]:
default:
}
}
Expand Down

0 comments on commit 9c885f7

Please sign in to comment.