mirror of
https://github.com/encounter/objdiff.git
synced 2025-12-12 22:56:19 +00:00
Fix section ordering with many same-named sections
Before, this was comparing, for example, `.text-2` with `.text-10` with standard string comparison, yielding `.text-10` before `.text-2`. Instead, this simply uses a stable sort by name, which preserves the relative ordering of sections.
This commit is contained in:
@@ -701,7 +701,7 @@ pub fn display_sections(
|
||||
});
|
||||
}
|
||||
}
|
||||
sections.sort_by(|a, b| a.id.cmp(&b.id));
|
||||
sections.sort_by(|a, b| a.name.cmp(&b.name));
|
||||
sections
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user