diff --git a/src/usb/task.rs b/src/usb/task.rs index b139f9d7..a96175ff 100644 --- a/src/usb/task.rs +++ b/src/usb/task.rs @@ -236,9 +236,5 @@ fn cobs_decode(src: &[u8], dest: &mut [u8]) -> Option { di += 1; } } - // Strip trailing zero if present (COBS artifact) - if di > 0 && dest[di - 1] == 0 { - di -= 1; - } Some(di) }