Skip to content

Commit ee24eb0

Browse files
committed
fix(support_rp2040): do not move the cursor forward if the sink is stuck
Fixes serial output corruption that occurs when a string longer than the FIFO size is outputted by `sprint!`.
1 parent 5bffece commit ee24eb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/r3_support_rp2040/src/stdout.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ impl WrapSerialWrite {
5151
[head, tail @ ..] => {
5252
// Output the first byte. If this gets stuck,
5353
// break out of `interrupt::free`.
54-
s = tail;
5554
stdout
5655
.write(*head)
5756
.map_err(|e| e.map(|_| core::fmt::Error))?;
57+
s = tail;
5858
}
5959
}
6060
}

0 commit comments

Comments
 (0)