Skip to content

Commit

Permalink
FIxed oversight with perfectly flush LBL1 blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAlternateDoctor committed Mar 10, 2024
1 parent e3dbffe commit 534d07e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/structs/lbl1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ impl LBL1 {
let label_defs = Self::get_offsets(buffer, order, block_amount)?;
buffer.seek(SeekFrom::Start(start_block))?;
let labels = Self::get_labels(buffer, order, label_defs.clone())?;
buffer.seek(SeekFrom::Start(block_start+0x10+section_size as u64+(0x10-(section_size%0x10)) as u64))?;
let leftover_padding = if section_size%0x10 != 0 {0x10-(section_size%0x10)} else {0};
buffer.seek(SeekFrom::Start(block_start+0x10+section_size as u64+(leftover_padding) as u64))?;
println!("Extracted labels.");
Ok(LBL1{
_magic: magic,
Expand Down

0 comments on commit 534d07e

Please sign in to comment.