diff options
author | iximeow <me@iximeow.net> | 2024-06-18 23:02:33 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2024-06-18 23:02:33 -0700 |
commit | 1dc74628d428e2e65c59147900ea44a9db7ab163 (patch) | |
tree | 84db97addec2908580a902d250da6356dbb06abf | |
parent | d91b2d1443c6ba4e850023032d4e93beab820fdc (diff) |
make write_2 work again for comparison (kinda)
-rw-r--r-- | src/long_mode/display.rs | 17 |
1 files changed, 10 insertions, 7 deletions
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(()) } |