mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-04 12:58:41 +00:00
fix section order
This commit is contained in:
committed by
Ryan Fleury
parent
881050addf
commit
47ef37ed8e
+10
-5
@@ -1082,11 +1082,16 @@ lnk_section_contrib_ptr_is_before(void *raw_a, void *raw_b)
|
|||||||
|
|
||||||
int cmp;
|
int cmp;
|
||||||
|
|
||||||
// place sections without sort postfix first
|
if (a->u.sort_idx_size <= 1 && b->u.sort_idx_size <= 1) {
|
||||||
if (a->u.sort_idx_size == 0 && b->u.sort_idx_size > 0) {
|
if (a->u.sort_idx_size == b->u.sort_idx_size) {
|
||||||
cmp = -1;
|
cmp = cmp = u32_compar(&a->u.obj_idx, &b->u.obj_idx);
|
||||||
} else if (a->u.sort_idx_size > 0 && b->u.sort_idx_size == 0) {
|
if (cmp == 0) {
|
||||||
cmp = +1;
|
cmp = u32_compar(&a->u.obj_sect_idx, &b->u.obj_sect_idx);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// place sections without sort postfix first
|
||||||
|
cmp = a->u.sort_idx_size < b->u.sort_idx_size;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// sort on section postfix
|
// sort on section postfix
|
||||||
String8 a_sort_idx = str8(a->u.sort_idx, a->u.sort_idx_size);
|
String8 a_sort_idx = str8(a->u.sort_idx, a->u.sort_idx_size);
|
||||||
|
|||||||
Reference in New Issue
Block a user