Skip to content

Commit 3afd2c3

Browse files
mikesmittydeadprogram
authored andcommitted
fix: update m.queuedBytes when clamping output to avoid corrupting sentBytes
1 parent bd19f3b commit 3afd2c3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/machine/usb/msc/scsi.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ func (m *msc) scsiCmdBegin() {
7272
if m.cbw.transferLength() < uint32(len(m.buf)) {
7373
m.buf = m.buf[:m.cbw.transferLength()]
7474
}
75+
m.queuedBytes = uint32(len(m.buf))
7576
m.sendUSBPacket(m.buf)
7677
}
7778
}

0 commit comments

Comments
 (0)