mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 02:27:48 +00:00
fix: update m.queuedBytes when clamping output to avoid corrupting sentBytes
This commit is contained in:
@@ -72,6 +72,7 @@ func (m *msc) scsiCmdBegin() {
|
||||
if m.cbw.transferLength() < uint32(len(m.buf)) {
|
||||
m.buf = m.buf[:m.cbw.transferLength()]
|
||||
}
|
||||
m.queuedBytes = uint32(len(m.buf))
|
||||
m.sendUSBPacket(m.buf)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user