bug fix
This commit is contained in:
parent
b17a84212f
commit
d470881d98
1 changed files with 2 additions and 3 deletions
|
|
@ -121,20 +121,19 @@ impl CodeItem {
|
|||
i += 1;
|
||||
}
|
||||
for insn in &self.insns {
|
||||
addr += insn.size() as u32;
|
||||
addr += insn.size() as u32 / 2;
|
||||
while i < addresses.len() && addresses[i] == addr {
|
||||
i += 1;
|
||||
}
|
||||
}
|
||||
if i < addresses.len() && addresses[i] < addr {
|
||||
println!("{addresses:x?}");
|
||||
return Err(Error::InconsistantStruct(format!(
|
||||
"Found an address in try block (0x{:x}) that does not align with an instruction",
|
||||
addresses[i]
|
||||
)));
|
||||
}
|
||||
|
||||
// TODO check goto addresses? pb: op code are not parsed so goto instruction are not known
|
||||
// TODO check goto and if addresses? pb: op code are not parsed so goto instruction are not known
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue