Only skip flags in XCLC if they exist
I guess older esp files don't have flags in the struct, which wasn't mentioned by the UESP mod file format page.
This commit is contained in:
parent
173289a7e8
commit
f8ddd6f939
@ -487,8 +487,13 @@ fn parse_cell_fields<'a>(input: &'a [u8]) -> IResult<&'a [u8], CellData> {
|
|||||||
let (remaining, y) = le_i32(remaining)?;
|
let (remaining, y) = le_i32(remaining)?;
|
||||||
cell_data.x = Some(x);
|
cell_data.x = Some(x);
|
||||||
cell_data.y = Some(y);
|
cell_data.y = Some(y);
|
||||||
|
if field.size == 12 {
|
||||||
|
// older (v. 0.94) files don't have the flags in this struct
|
||||||
let (remaining, _) = take(4usize)(remaining)?;
|
let (remaining, _) = take(4usize)(remaining)?;
|
||||||
input = remaining;
|
input = remaining;
|
||||||
|
} else {
|
||||||
|
input = remaining;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"XXXX" => {
|
"XXXX" => {
|
||||||
let (remaining, size) = le_u32(input)?;
|
let (remaining, size) = le_u32(input)?;
|
||||||
|
Loading…
Reference in New Issue
Block a user