1
Fork 0
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:
Joshua Goins 2025-07-09 22:56:47 -04:00
parent fe8afff1c3
commit 0c6383c3cc

View file

@ -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)