diff options
-rw-r--r-- | src/lex.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -162,7 +162,7 @@ BcStatus bc_lex_next(BcLex *l) { assert(l); l->last = l->t; - l->line += l->last == BC_LEX_NLINE; + l->line += (l->i != 0 && l->buf[l->i] == '\n'); if (l->last == BC_LEX_EOF) return bc_lex_err(l, BC_ERROR_PARSE_EOF); |