Skip to content

Commit a0fe329

Browse files
alanpqCrauzer
authored andcommitted
feat: align chunks to 8 bytes
1 parent 24366a9 commit a0fe329

File tree

1 file changed

+2
-0
lines changed
  • crates/league-modpkg/src

1 file changed

+2
-0
lines changed

crates/league-modpkg/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ pub struct Modpkg<TSource: Read + Seek + Default> {
4343
#[br(count = wad_path_count)]
4444
wad_paths: Vec<NullString>,
4545

46+
// alan: pretty sure this works to align the individual chunks - https://github.com/jam1garner/binrw/issues/68
47+
#[brw(align_before = 8)]
4648
#[br(count = chunk_count, map = |m: Vec<ModpkgChunk>| m.into_iter().map(|c| (c.path_hash, c)).collect())]
4749
#[bw(map = |m| m.values().copied().collect_vec())]
4850
chunks: HashMap<u64, ModpkgChunk>,

0 commit comments

Comments
 (0)