summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2023-08-12 22:36:30 +0300
committerOxore <oxore@protonmail.com>2023-08-12 22:42:06 +0300
commitb63c89c477adeb6a0f065938ef4c164ebb6676ba (patch)
treeee53457d4b7634237a75f3962edb4d7b43b4c6a2
parentb17c600f5235e30fd41a553bbdb83d0e718de285 (diff)
Fix comment emission
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index 8c92a1d..d6b3dba 100644
--- a/main.c
+++ b/main.c
@@ -3122,7 +3122,7 @@ static int assem_emit(struct assem *const self, FILE *const stream)
}
if (stmt->comment_token) {
const struct token token = lex->tokbuf[stmt->comment_token];
- fprintf(stream, " %.*s", (int)token.length, lex->input + token.offset);
+ fprintf(stream, " |%.*s", (int)token.length - 1, lex->input + token.offset + 1);
}
fprintf(stream, "\n");
}