From a2fdcc2106024e7e9b1b119c9de50242706c9424 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 5 Jan 2019 02:05:27 -0800 Subject: fix incorrect handling of scale in some sib instances --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index 5941ee8..1a8a5fc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1379,10 +1379,10 @@ fn read_E(bytes_iter: &mut Iterator, prefixes: &Prefixes, m: u8, modbi bank: width_to_gp_reg_bank(width) }; if disp == 0 { - *result = Operand::RegIndexBaseScale(base_reg, index_reg, ss); + *result = Operand::RegIndexBaseScale(base_reg, index_reg, 1u8 << ss); Ok(()) } else { - *result = Operand::RegIndexBaseScaleDisp(base_reg, index_reg, ss, disp as i32); + *result = Operand::RegIndexBaseScaleDisp(base_reg, index_reg, 1u8 << ss, disp as i32); Ok(()) } } -- cgit v1.1