Skip to content

Commit

Permalink
Fix path calculation in SqpkFileOperationData, again
Browse files Browse the repository at this point in the history
This should make retail patches work correctly
  • Loading branch information
redstrate committed Jul 18, 2024
1 parent d8fae2f commit 4d23bf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,13 +269,13 @@ struct SqpkFileOperationData {

// Note: counts the \0 at the end... for some reason
#[br(temp)]
#[bw(calc = get_string_len(path) as u32 + 1)]
#[bw(calc = get_string_len(path) as u32)]
path_length: u32,

#[brw(pad_after = 2)]
expansion_id: u16,

#[br(count = path_length - 1)]
#[br(count = path_length)]
#[br(map = read_string)]
#[bw(map = write_string)]
path: String,
Expand Down

0 comments on commit 4d23bf9

Please sign in to comment.