mirror of
https://github.com/redstrate/Physis.git
synced 2025-07-19 23:37:46 +00:00
Fix invalid PCB parsing panicking
This commit is contained in:
parent
fe8afff1c3
commit
0c6383c3cc
1 changed files with 2 additions and 2 deletions
|
@ -32,14 +32,14 @@ fn parse_resource_node_children(
|
|||
reader
|
||||
.seek(SeekFrom::Start(struct_start + child1_offset as u64))
|
||||
.unwrap();
|
||||
children.push(ResourceNode::read_le(reader).unwrap());
|
||||
children.push(ResourceNode::read_le(reader)?);
|
||||
}
|
||||
|
||||
if child2_offset != 0 {
|
||||
reader
|
||||
.seek(SeekFrom::Start(struct_start + child2_offset as u64))
|
||||
.unwrap();
|
||||
children.push(ResourceNode::read_le(reader).unwrap());
|
||||
children.push(ResourceNode::read_le(reader)?);
|
||||
}
|
||||
|
||||
Ok(children)
|
||||
|
|
Loading…
Add table
Reference in a new issue