1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-04-24 05:27:45 +00:00

Fix the wrong underlying representation for Platform

I forgot that for index files, it's supposed to be u8 while for patch
files it's u16 (why??) This is now fixed.
This commit is contained in:
Joshua Goins 2024-04-17 17:21:43 -04:00
parent 33e9be8af1
commit 140067c876
2 changed files with 3 additions and 2 deletions

View file

@ -59,7 +59,7 @@ pub fn read_version(p: &Path) -> Option<String> {
} }
#[binrw] #[binrw]
#[brw(repr = u16)] #[brw(repr = u8)]
#[derive(Clone, Debug, PartialEq)] #[derive(Clone, Debug, PartialEq)]
pub enum Platform { pub enum Platform {
Win32, Win32,

View file

@ -267,7 +267,8 @@ struct SqpkFileOperationData {
#[br(big)] #[br(big)]
struct SqpkTargetInfo { struct SqpkTargetInfo {
#[br(pad_before = 3)] #[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, region: Region,
#[br(map = read_bool_from::<u16>)] #[br(map = read_bool_from::<u16>)]
is_debug: bool, is_debug: bool,