mirror of
https://github.com/encounter/objdiff.git
synced 2025-06-07 15:13:47 +00:00
ARM: Fix subtract with overflow error when no mapping symbol at address 0 (#183)
This commit is contained in:
parent
196c003a92
commit
e101610416
@ -199,7 +199,7 @@ impl Arch for ArchArm {
|
|||||||
.unwrap_or(&fallback_mappings);
|
.unwrap_or(&fallback_mappings);
|
||||||
let first_mapping_idx = mapping_symbols
|
let first_mapping_idx = mapping_symbols
|
||||||
.binary_search_by_key(&start_addr, |x| x.address)
|
.binary_search_by_key(&start_addr, |x| x.address)
|
||||||
.unwrap_or_else(|idx| idx - 1);
|
.unwrap_or_else(|idx| idx.saturating_sub(1));
|
||||||
let mut mode = mapping_symbols[first_mapping_idx].mapping;
|
let mut mode = mapping_symbols[first_mapping_idx].mapping;
|
||||||
|
|
||||||
let mut mappings_iter = mapping_symbols
|
let mut mappings_iter = mapping_symbols
|
||||||
|
Loading…
x
Reference in New Issue
Block a user