From 743ead0442d4ce290e0f4ea416988f1dcdc53255 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Thu, 23 Jan 2014 23:47:15 +0800 Subject: [PATCH] fix a bug in cs.c introduced in the last port between branches --- cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cs.c b/cs.c index 95d99243..efd6448f 100644 --- a/cs.c +++ b/cs.c @@ -198,7 +198,7 @@ static void fill_insn(struct cs_struct *handle, cs_insn *insn, char *buffer, MCI { if (handle->detail) { // avoiding copy insn->detail - memcpy(insn, (uintptr_t)&mci->flat_insn, sizeof(*insn) - sizeof(insn->detail)); + memcpy(insn, &mci->flat_insn, sizeof(*insn) - sizeof(insn->detail)); // NOTE: copy details in 2 chunks, since union is always put at address divisible by 8 // copy from @regs_read until @arm