diff options
| author | iximeow <me@iximeow.net> | 2021-07-03 09:40:56 -0700 | 
|---|---|---|
| committer | iximeow <me@iximeow.net> | 2021-07-03 09:40:56 -0700 | 
| commit | 8b4de9092947380e8602766f64af4081c89b29d7 (patch) | |
| tree | 83b959959f29fbe6684705b032a1718e6da76d27 /src/long_mode | |
| parent | 312591aabadc6d43a80699e2a6da611932a643c7 (diff) | |
fix incorrect rex prefix selection
Diffstat (limited to 'src/long_mode')
| -rw-r--r-- | src/long_mode/mod.rs | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs index 40e7fb2..769706f 100644 --- a/src/long_mode/mod.rs +++ b/src/long_mode/mod.rs @@ -7000,6 +7000,7 @@ fn read_instr<T: Reader<<Arch as yaxpeax_arch::Arch>::Address, <Arch as yaxpeax_      let record: OpcodeRecord = loop {          let record = next_rec;          if nextb >= 0x40 && nextb < 0x50 { +            let b = nextb;              if words.offset() >= 15 {                  return Err(DecodeError::TooLong);              } @@ -7007,7 +7008,7 @@ fn read_instr<T: Reader<<Arch as yaxpeax_arch::Arch>::Address, <Arch as yaxpeax_              next_rec = unsafe {                  core::ptr::read_volatile(&OPCODES[nextb as usize])              }; -            prefixes.rex_from(nextb); +            prefixes.rex_from(b);          } else if let Interpretation::Instruction(_) = record.0 {              break record;          } else {  | 
