Skip to content

Commit

Permalink
fix: Fixed wrong header type for main RAR header
Browse files Browse the repository at this point in the history
  • Loading branch information
Le0X8 committed Aug 5, 2024
1 parent 6cbff53 commit a1a431c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/formats/rar/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ fn parse_header(file: &mut FileReader) -> Header {
let extra_size = if flags.extra_area { file.read_vu7() } else { 0 };
let data_size = if flags.data_area { file.read_vu7() } else { 0 };
match header_type {
0 => {
1 => {
file.jump(&(extra_size as i128));
file.jump(&(data_size as i128));
Header {
Expand Down Expand Up @@ -130,6 +130,6 @@ fn parse_header(file: &mut FileReader) -> Header {
flags,
}
}
_ => panic!("Unknown header type"),
_ => panic!("Unknown header type {}", header_type),
}
}

0 comments on commit a1a431c

Please sign in to comment.