From e80b5622ec956a92f24ce6487fb0d76e9c541515 Mon Sep 17 00:00:00 2001 From: iximeow Date: Wed, 12 Jan 2022 15:46:39 -0800 Subject: fuzz DisplayStyle::C and fix corresponding issues --- src/long_mode/display.rs | 4 +++- src/protected_mode/display.rs | 4 +++- src/real_mode/display.rs | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs index 3295ae7..9ba128d 100644 --- a/src/long_mode/display.rs +++ b/src/long_mode/display.rs @@ -3532,7 +3532,9 @@ fn contextualize_c(instr: &Instruction, colors: &Y, write!(out, "${}", colors.number(signed_i32_hex(rel))) } } - _ => { unreachable!() } + other => { + write!(out, "{}", other) + } } } diff --git a/src/protected_mode/display.rs b/src/protected_mode/display.rs index c2b52eb..69cdbc7 100644 --- a/src/protected_mode/display.rs +++ b/src/protected_mode/display.rs @@ -3545,7 +3545,9 @@ fn contextualize_c(instr: &Instruction, colors: &Y, write!(out, "${}", colors.number(signed_i32_hex(rel))) } } - _ => { unreachable!() } + other => { + write!(out, "{}", other) + } } } diff --git a/src/real_mode/display.rs b/src/real_mode/display.rs index 0ae0a46..070ca56 100644 --- a/src/real_mode/display.rs +++ b/src/real_mode/display.rs @@ -3545,7 +3545,9 @@ fn contextualize_c(instr: &Instruction, colors: &Y, write!(out, "${}", colors.number(signed_i32_hex(rel))) } } - _ => { unreachable!() } + other => { + write!(out, "{}", other) + } } } -- cgit v1.1