From 1dc74628d428e2e65c59147900ea44a9db7ab163 Mon Sep 17 00:00:00 2001 From: iximeow Date: Tue, 18 Jun 2024 23:02:33 -0700 Subject: make write_2 work again for comparison (kinda) --- src/long_mode/display.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/long_mode') diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs index 10ceb89..d6e03a9 100644 --- a/src/long_mode/display.rs +++ b/src/long_mode/display.rs @@ -5144,7 +5144,6 @@ impl Instruction { } } - /* let address: u64 = 0; let context = Some(&NoContext); let colors = &NoColors; @@ -5176,11 +5175,16 @@ impl Instruction { if self.operand_count > 0 { danger_anguished_string_write(out, " "); - if self.visit_operand(0, &mut RelativeBranchPrinter { - inst: &self, - colors, - out, - })? { + let rel_res = { + let out = unsafe { core::mem::transmute::<&mut alloc::string::String, &mut BigEnoughString>(out) }; + self.visit_operand(0, &mut RelativeBranchPrinter { + inst: &self, + out: &mut NoColorsSink { + out: out, + }, + })? + }; + if rel_res { return Ok(()); } @@ -5797,7 +5801,6 @@ impl Instruction { } } } - */ Ok(()) } -- cgit v1.1