objdiff-cli report: Skip unknown sections

Regression in v3.0.0-alpha.1

Fixes #171
This commit is contained in:
Luke Street 2025-03-19 18:54:05 -06:00
parent bc46e17824
commit 2612cda1fb

View File

@ -202,6 +202,9 @@ fn report_object(
for ((section_idx, section), section_diff) in for ((section_idx, section), section_diff) in
obj.sections.iter().enumerate().zip(&obj_diff.sections) obj.sections.iter().enumerate().zip(&obj_diff.sections)
{ {
if section.kind == SectionKind::Unknown {
continue;
}
let section_match_percent = section_diff.match_percent.unwrap_or_else(|| { let section_match_percent = section_diff.match_percent.unwrap_or_else(|| {
// Support cases where we don't have a target object, // Support cases where we don't have a target object,
// assume complete means 100% match // assume complete means 100% match