From f24ef749cd9f488eee1dd1d9b04f2cbbe9aa5f21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Balatoni?= <40299962+dbalatoni13@users.noreply.github.com> Date: Mon, 26 Oct 2026 12:56:49 +0100 Subject: [PATCH] Strip int3 padding on X86 too --- objdiff-core/src/arch/x86.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/objdiff-core/src/arch/x86.rs b/objdiff-core/src/arch/x86.rs index 4ca6d127..7fac1778 100644 --- a/objdiff-core/src/arch/x86.rs +++ b/objdiff-core/src/arch/x86.rs @@ -188,11 +188,9 @@ impl Arch for ArchX86 { branch_dest, }); } - // Strip trailing int3 instructions (alignment padding) for x64 - if matches!(self.arch, Architecture::X86_64) { - while out.last().is_some_and(|i| i.opcode == iced_x86::Mnemonic::Int3 as u16) { - out.pop(); - } + // Strip trailing int3 instructions (alignment padding) + while out.last().is_some_and(|i| i.opcode == iced_x86::Mnemonic::Int3 as u16) { + out.pop(); } Ok(out) }