fix hashmap mergin
This commit is contained in:
parent
be5922a726
commit
112ae0db7d
2 changed files with 4 additions and 2 deletions
|
|
@ -2687,7 +2687,9 @@ impl Apk {
|
||||||
)? {
|
)? {
|
||||||
instructions.push((addr, ins));
|
instructions.push((addr, ins));
|
||||||
addr += ins_f.size() / 2;
|
addr += ins_f.size() / 2;
|
||||||
labels.extend(ins_labels);
|
for (addr, mut label_l) in ins_labels.into_iter() {
|
||||||
|
labels.entry(addr).or_default().append(&mut label_l);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let mut insns = vec![];
|
let mut insns = vec![];
|
||||||
|
|
|
||||||
|
|
@ -504,7 +504,7 @@ impl DexWriter {
|
||||||
}
|
}
|
||||||
Instruction::Goto { label } => {
|
Instruction::Goto { label } => {
|
||||||
let (min_addr, max_addr) = label_min_max_addrs.get(label).ok_or(anyhow!(
|
let (min_addr, max_addr) = label_min_max_addrs.get(label).ok_or(anyhow!(
|
||||||
"Label {label} not found in label estimation map, known labels are [{}]",
|
"Label {label} not found in label estimation map but used in Goto instruction. Known labels are [{}].",
|
||||||
label_min_max_addrs
|
label_min_max_addrs
|
||||||
.keys()
|
.keys()
|
||||||
.map(|string| string.as_str())
|
.map(|string| string.as_str())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue