From 7796f7e088c5aa878cfb61b5a885b64daf390808 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 3 Jul 2021 13:39:46 -0700 Subject: clean up x86_32 and make interfaces match x86_64 --- src/protected_mode/display.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/protected_mode/display.rs') diff --git a/src/protected_mode/display.rs b/src/protected_mode/display.rs index 83d3b56..3e0079e 100644 --- a/src/protected_mode/display.rs +++ b/src/protected_mode/display.rs @@ -3414,7 +3414,13 @@ fn contextualize_intel(instr: &Instruction, colors: } } } else { - Operand::from_spec(instr, instr.operands[i as usize - 1]).width() / instr.mem_size + // this should never be `None` - that would imply two + // memory operands for a broadcasted operation. + if let Some(width) = Operand::from_spec(instr, instr.operands[i as usize - 1]).width() { + width / instr.mem_size + } else { + 0 + } }; write!(out, "{{1to{}}}", scale)?; } -- cgit v1.1