summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2009-06-30 20:38:04 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2009-06-30 20:38:04 (GMT)
commit176ad970db109523a3ac6d501b23608540d4a930 (patch)
treee769fbcfa7a1b97367d079fff283ab40c6a9393b
parentdcacf4201c9ef35b98ba5bfb778341de0cbaa337 (diff)
Tried to fix a bug in 'jle' relative address computing.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@87 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
-rw-r--r--ChangeLog5
-rw-r--r--src/arch/x86/processor.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index cec2b3d..9f4ab26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
09-06-30 Cyrille Bagard <nocbos@gmail.com>
+ * src/arch/x86/processor.c:
+ Try to fix a bug in 'jle' relative address computing.
+
+09-06-30 Cyrille Bagard <nocbos@gmail.com>
+
* src/arch/x86/instruction.c:
Fix a copy/paste mistake about the type of a 'jle' link.
diff --git a/src/arch/x86/processor.c b/src/arch/x86/processor.c
index b4ee334..ac6fb8e 100644
--- a/src/arch/x86/processor.c
+++ b/src/arch/x86/processor.c
@@ -181,7 +181,11 @@ static GArchInstruction *g_x86_processor_decode_instruction(const GX86Processor
id = x86_guess_next_instruction(data, *pos, len, &prefix, &care);
- if (prefix & XPX_TWO_BYTES) (*pos)++;
+ if (prefix & XPX_TWO_BYTES)
+ {
+ (*pos)++;
+ addr++;
+ }
if (prefix & XPX_OPERAND_SIZE_OVERRIDE) (*pos)++;
if (id != XOP_COUNT && !care) (*pos)++;