mirror of https://github.com/icedland/iced.git
Add an error msg if it's an invalid `displ_size`
This commit is contained in:
parent
9f0cb87170
commit
7643bf4c08
|
@ -662,7 +662,10 @@ impl Encoder {
|
|||
self.displ = addr as u32;
|
||||
self.displ_hi = (addr >> 32) as u32;
|
||||
}
|
||||
_ => unreachable!(),
|
||||
_ => self.set_error_message(format!(
|
||||
"Operand {}: Instruction::memory_displ_size() must be initialized to 2 (16-bit), 4 (32-bit) or 8 (64-bit)",
|
||||
operand
|
||||
)),
|
||||
}
|
||||
} else {
|
||||
if cfg!(debug_assertions) {
|
||||
|
|
Loading…
Reference in New Issue