diff options
| author | Alan Wu <XrXr@users.noreply.github.com> | 2025-07-18 15:36:25 -0400 |
|---|---|---|
| committer | Alan Wu <XrXr@users.noreply.github.com> | 2025-07-21 13:51:44 -0400 |
| commit | 495e3f642bd2efdb4479a14866610e94defb9e66 (patch) | |
| tree | 118ec2c594345b69089d44c63840e06c80f01238 | |
| parent | 6b0e5de4e68bc60c10ce7974cb69f246678a9512 (diff) | |
ZJIT: Trim disassembly output from capstone-rs
It has a bad habit of leaving a trailing space, for example for ARM
`ret`.
| -rw-r--r-- | zjit/src/disasm.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zjit/src/disasm.rs b/zjit/src/disasm.rs index 5c7a7be704..09864ef649 100644 --- a/zjit/src/disasm.rs +++ b/zjit/src/disasm.rs @@ -44,7 +44,7 @@ pub fn disasm_addr_range(cb: &CodeBlock, start_addr: usize, end_addr: usize) -> writeln!(&mut out, " {BOLD_BEGIN}# {comment}{BOLD_END}").unwrap(); } } - writeln!(&mut out, " {insn}").unwrap(); + writeln!(&mut out, " {}", format!("{insn}").trim()).unwrap(); } return out; |
