summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nqdasm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nqdasm.c b/nqdasm.c
index 4969f47..a2ff732 100644
--- a/nqdasm.c
+++ b/nqdasm.c
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <string.h>
#include "mnemonics.h"
@@ -33,7 +34,8 @@ int main()
printf("\t%s", m->mnem);
for (int i = 0; i < 3 && m->operands[i].type; i++) {
- printf("%s", i ? ", " : " ");
+ if (i) printf(", ");
+ else printf("%*s", 8 - (int)strlen(m->mnem), "");
print_operand(bits, m->operands + i);
}
printf("\n");