mirror of
https://github.com/smoltcp-rs/smoltcp.git
synced 2025-09-29 05:40:52 +00:00
phy: fix FaultInjector returning a too big buffer when simulating a drop on tx
This commit is contained in:
parent
32cf4befd0
commit
17cf2c8d47
@ -297,7 +297,7 @@ impl<'a, Tx: phy::TxToken> phy::TxToken for TxToken<'a, Tx> {
|
||||
};
|
||||
|
||||
if drop {
|
||||
return f(&mut self.junk);
|
||||
return f(&mut self.junk[..len]);
|
||||
}
|
||||
|
||||
let Self { token, state, config, .. } = self;
|
||||
|
Loading…
x
Reference in New Issue
Block a user