Fix off-by-one error in compacting delays
parent
9f9d54d1fd
commit
bf9343686a
|
@ -405,7 +405,7 @@ pub fn compact_delays( events: Vec<EchoEvent> ) -> Result<Vec<EchoEvent>, Box<dy
|
|||
let delay_type = *iter.next().ok_or( "internal error: empty event" )?;
|
||||
|
||||
if delay_type & 0xF0 == ESF_DELAY_SHORT {
|
||||
cumulative_delay += ( delay_type & 0x0F ) as u16;
|
||||
cumulative_delay += ( ( delay_type & 0x0F ) as u16 ) + 1;
|
||||
} else if delay_type == ESF_DELAY_LONG {
|
||||
cumulative_delay += ( *iter.next().ok_or( "internal error: expected delay byte" )? ) as u16;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue