fix parsing errors in sml
This commit is contained in:
parent
e9018111be
commit
d5126a6c34
2 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ mod can {
|
|||
}
|
||||
|
||||
let total = u32::from_be_bytes([data[0], data[1], data[2], data[3]]);
|
||||
let current = u32::from_be_bytes([data[4], data[4], data[5], data[6]]);
|
||||
let current = u32::from_be_bytes([data[4], data[5], data[6], data[7]]);
|
||||
|
||||
Ok(Self { total, current })
|
||||
}
|
||||
|
|
|
@ -571,7 +571,7 @@ impl<'a> SmlType<'a> for AbortOnError {
|
|||
where
|
||||
Self: Sized,
|
||||
{
|
||||
let disc: u8 = buf.read(1)?[0];
|
||||
let disc: u8 = buf.parse()?;
|
||||
Ok(match disc {
|
||||
0x00 => Self::Continue,
|
||||
0x01 => Self::ContinueWithNextGroup,
|
||||
|
|
Loading…
Reference in a new issue