diff --git a/src/disassembler.rs b/src/disassembler.rs index 97fabd04..5adfbbe3 100644 --- a/src/disassembler.rs +++ b/src/disassembler.rs @@ -45,7 +45,7 @@ fn byteswap_str(name: &str, insn: &ebpf::Insn) -> String { #[inline] fn signed_off_str(value: i16) -> String { if value < 0 { - format!("-{:#x}", -value) + format!("-{:#x}", -(value as isize)) } else { format!("+{value:#x}") }