Skip to content

Commit e28a202

Browse files
committed
ARM: Fix index out of bounds error when there are no mapping symbols
1 parent 2cd1e2e commit e28a202

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

objdiff-core/src/arch/arm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ impl Arch for ArchArm {
183183
let mapping_symbols = self
184184
.disasm_modes
185185
.get(&section_index)
186-
.map(|x| x.as_slice())
186+
.map(|x| if x.is_empty() { &fallback_mappings } else { x.as_slice() })
187187
.unwrap_or(&fallback_mappings);
188188
let first_mapping_idx = mapping_symbols
189189
.binary_search_by_key(&start_addr, |x| x.address)

0 commit comments

Comments
 (0)