From 9206fee94d48b20abad63302a6a573d8101440c4 Mon Sep 17 00:00:00 2001 From: ghorsington Date: Sat, 10 Sep 2022 21:36:46 +0300 Subject: [PATCH] Fix modrm instruction operand info not being copied --- .../x86/x86_insn_decode/x86_insn_decode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/InstructionRelocation/x86/x86_insn_decode/x86_insn_decode.c b/source/InstructionRelocation/x86/x86_insn_decode/x86_insn_decode.c index 39ab631..f58f7c9 100644 --- a/source/InstructionRelocation/x86/x86_insn_decode/x86_insn_decode.c +++ b/source/InstructionRelocation/x86/x86_insn_decode/x86_insn_decode.c @@ -471,6 +471,9 @@ static void x86_insn_decode_opcode(x86_insn_reader_t *rd, x86_insn_decode_t *ins // update the insn spec insn_spec.name = group_insn->name; insn_spec.flags = group_insn->flags; + for (int i = 0; i < sizeof(insn_spec.operands) / sizeof(x86_insn_operand_spec_t); i++) { + insn_spec.operands[i] = group_insn->operands[i]; + } } insn->primary_opcode = opcode;