summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lexer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lexer.c b/src/lexer.c
index 5610519..540160a 100644
--- a/src/lexer.c
+++ b/src/lexer.c
@@ -94,7 +94,7 @@ static int read_buffer(lexer_state_t *ls)
ls->in_token = false;
ret_token = true;
}
- } else if (*ls->buf_c == '/' && ls->last == '/') {
+ } else if (*ls->buf_c == '/' && (ls->cc && ls->last == '/')) {
ls->in_comment = true;
ls->in_token = false;