diff --git a/androscalpel_serializer/src/items/code.rs b/androscalpel_serializer/src/items/code.rs index df51031..3e9ffae 100644 --- a/androscalpel_serializer/src/items/code.rs +++ b/androscalpel_serializer/src/items/code.rs @@ -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(()) }