From 4d23bf9f08799281234fbf1995b9459450ce2708 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Thu, 18 Jul 2024 13:57:12 -0400 Subject: [PATCH] Fix path calculation in SqpkFileOperationData, again This should make retail patches work correctly --- src/patch.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/patch.rs b/src/patch.rs index 9dc73d1..2bfa9a8 100755 --- a/src/patch.rs +++ b/src/patch.rs @@ -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,