xcore: increase op_count in set_mem_access() only on register operand. bug reported by Ben Nagy
diff --git a/arch/XCore/XCoreInstPrinter.c b/arch/XCore/XCoreInstPrinter.c
index 7295151..bafe5ba 100644
--- a/arch/XCore/XCoreInstPrinter.c
+++ b/arch/XCore/XCoreInstPrinter.c
@@ -182,9 +182,9 @@
} else {
if (reg) {
MI->flat_insn->detail->xcore.operands[MI->flat_insn->detail->xcore.op_count].mem.index = reg;
+ // done, create the next operand slot
+ MI->flat_insn->detail->xcore.op_count++;
}
- // done, create the next operand slot
- MI->flat_insn->detail->xcore.op_count++;
}
}