Skip to content

Commit

Permalink
Fix wrong parentheses in timestamp calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
nickelc authored and sdroege committed Oct 14, 2021
1 parent 427d5a1 commit 58546f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pub fn tag_header(input: &[u8]) -> IResult<&[u8], TagHeader> {
let header = TagHeader {
tag_type,
data_size,
timestamp: (timestamp_extended as u32) << (24 + timestamp),
timestamp: (u32::from(timestamp_extended) << 24) + timestamp,
stream_id,
};
Ok((i, header))
Expand All @@ -95,7 +95,7 @@ pub fn complete_tag(input: &[u8]) -> IResult<&[u8], Tag<'_>> {
header: TagHeader {
tag_type,
data_size,
timestamp: (timestamp_extended as u32) << (24 + timestamp),
timestamp: (u32::from(timestamp_extended) << 24) + timestamp,
stream_id,
},
data,
Expand Down

0 comments on commit 58546f0

Please sign in to comment.