diff --git a/src/common.rs b/src/common.rs index c19f64a..6a2e576 100755 --- a/src/common.rs +++ b/src/common.rs @@ -59,7 +59,7 @@ pub fn read_version(p: &Path) -> Option { } #[binrw] -#[brw(repr = u16)] +#[brw(repr = u8)] #[derive(Clone, Debug, PartialEq)] pub enum Platform { Win32, diff --git a/src/patch.rs b/src/patch.rs index 04340a1..1637ac4 100755 --- a/src/patch.rs +++ b/src/patch.rs @@ -267,7 +267,8 @@ struct SqpkFileOperationData { #[br(big)] struct SqpkTargetInfo { #[br(pad_before = 3)] - platform: Platform, + #[br(pad_size_to = 2)] + platform: Platform, // Platform is read as a u16, but the enum is u8 region: Region, #[br(map = read_bool_from::)] is_debug: bool,