aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2021-05-16 19:00:03 -0700
committeriximeow <me@iximeow.net>2021-05-16 19:00:03 -0700
commitbeff8d0f33bc4152422c175ff720fdba0dc021da (patch)
tree4a46885df4c9d3e0e6c1ac41cca68c02d33ad7d6
parente483a562a84204e4e1dd2543e080e9f879a89d82 (diff)
fix ShowContextual rendering error with stale data and operands, publish 0.2.20.2.2
-rw-r--r--CHANGELOG5
-rw-r--r--Cargo.toml2
-rw-r--r--src/long_mode/display.rs3
3 files changed, 8 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index ad57335..8e9b8cd 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,8 @@
+## 0.2.2
+* fix rendering error in `ShowContextual` impl with `&[Option<String>]` overrides
+ - would in some circumstances incorrectly print stale data if an `Instruction` was reused for decoding.
+ no impact on logical correctness, but certainly made for awkward disassembly in some cases.
+
## 0.2.1
* update `yaxpeax-arch` dep to 0.0.5
- no external-facing changes for this, but `yaxpeax-arch 0.0.5` uses `crossterm` for cross-platform terminal coloring
diff --git a/Cargo.toml b/Cargo.toml
index 4779722..b8125a4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "yaxpeax-x86"
-version = "0.2.1"
+version = "0.2.2"
authors = [ "iximeow <me@iximeow.net>" ]
license = "0BSD"
repository = "http://git.iximeow.net/yaxpeax-x86/"
diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs
index 1d68719..f84ff7a 100644
--- a/src/long_mode/display.rs
+++ b/src/long_mode/display.rs
@@ -2820,7 +2820,8 @@ impl <T: fmt::Write, Y: YaxColors> ShowContextual<u64, [Option<alloc::string::St
x.colorize(colors, out)?;
}
};
- for i in 1..4 {
+ for i in 1..self.operand_count {
+ let i = i as usize;
match self.opcode {
Opcode::MOVSX_b |
Opcode::MOVZX_b => {