fix: fix bug in offset advancing with modrm bytes
This commit is contained in:
@@ -111,13 +111,13 @@ impl Disassembler {
|
|||||||
None
|
None
|
||||||
}
|
}
|
||||||
1 => {
|
1 => {
|
||||||
self.offset += 2; // one additional byte was read
|
// self.offset += 2; // one additional byte was read
|
||||||
let byte = self.parse_byte();
|
let byte = self.parse_byte();
|
||||||
log::debug!("Additional byte during ModRM parsing was read.");
|
log::debug!("Additional byte during ModRM parsing was read.");
|
||||||
Some(Displacement::Byte(byte))
|
Some(Displacement::Byte(byte))
|
||||||
}
|
}
|
||||||
2 => {
|
2 => {
|
||||||
self.offset += 3; // two additional bytes (word) was read
|
// self.offset += 3; // two additional bytes (word) was read
|
||||||
let word = self.parse_word();
|
let word = self.parse_word();
|
||||||
log::debug!("Additional two bytes during ModRM parsing was read.");
|
log::debug!("Additional two bytes during ModRM parsing was read.");
|
||||||
Some(Displacement::Word(word))
|
Some(Displacement::Word(word))
|
||||||
|
|||||||
Reference in New Issue
Block a user