From b63c89c477adeb6a0f065938ef4c164ebb6676ba Mon Sep 17 00:00:00 2001 From: Oxore Date: Sat, 12 Aug 2023 22:36:30 +0300 Subject: Fix comment emission --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); } -- cgit v1.2.3