diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-02-14 08:36:42 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-02-14 08:36:42 +0100 |
commit | 422e1e63b332ec41599e49a03e43c342046c92f7 (patch) | |
tree | 7b29971047c5f09872892c04de8f5713606496d3 | |
parent | dcc049e67d79c97838f83692fd5bdd2e361f4f1f (diff) |
Set pad to false after padding
-rw-r--r-- | src/c8asm/assembler.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/c8asm/assembler.c b/src/c8asm/assembler.c index 2e8693b..50955c4 100644 --- a/src/c8asm/assembler.c +++ b/src/c8asm/assembler.c @@ -100,8 +100,10 @@ assemble(FILE *stream, struct ast ast) /* Instructions need to be 0-padded so they appear on an even byte boundary. */ - if (node->instr.kind != I_DB && pad) + if (node->instr.kind != I_DB && pad) { putchar(0); + pad = false; + } switch (node->instr.kind) { case I_ADD_I_VX: |