arm64: handle decomposer properly for alias insn
diff --git a/cs.c b/cs.c
index 0147533..e363403 100644
--- a/cs.c
+++ b/cs.c
@@ -170,12 +170,12 @@
memcpy(insn, &mci->pub_insn, sizeof(*insn));
// map internal instruction opcode to public insn ID
+ if (handle->insn_id)
+ handle->insn_id(insn, MCInst_getOpcode(mci));
+
+ // alias instruction might have ID saved in OpcodePub
if (MCInst_getOpcodePub(mci))
- MCInst_setOpcode(mci, MCInst_getOpcodePub(mci));
- else {
- if (handle->insn_id)
- handle->insn_id(insn, MCInst_getOpcode(mci));
- }
+ insn->id = MCInst_getOpcodePub(mci);
if (printer)
printer(insn->id, insn, buffer);