From 1f8db856882e36cfe352add9987b9eb8334c7d61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Kujawa?= Date: Thu, 2 Feb 2017 20:58:30 +0100 Subject: [PATCH] Fix pointer precedence. Should resolve #1. --- src/instruction.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/instruction.c b/src/instruction.c index 3b08f89..a724fc1 100644 --- a/src/instruction.c +++ b/src/instruction.c @@ -150,12 +150,12 @@ assemble_single(uint8_t **buf, uint8_t *bsize, const char *mnemonic, addressing_ /* fill the buffer */ memset(*buf, 0, id.size); - *buf[0] = opcode; + (*buf)[0] = opcode; /* XXX */ if (id.size > 1) - *buf[1] = op1; + (*buf)[1] = op1; if (id.size > 2) - *buf[2] = op2; + (*buf)[2] = op2; return found; }