chg: validating we got a full usbcommand (512b)
This commit is contained in:
@@ -38,7 +38,7 @@ bool cmd_receive(UsbCommand* cmd) {
|
||||
if (!usb_poll_validate_length()) return false;
|
||||
|
||||
// Try to retrieve the available command frame
|
||||
size_t rxlen = usb_read((byte_t*)cmd,sizeof(UsbCommand));
|
||||
size_t rxlen = usb_read((byte_t*)cmd, sizeof(UsbCommand));
|
||||
|
||||
// Check if the transfer was complete
|
||||
if (rxlen != sizeof(UsbCommand)) return false;
|
||||
|
||||
Reference in New Issue
Block a user