Fix a lex line counting bug
diff --git a/src/lex.c b/src/lex.c
index ad69ba5..bc17ba5 100644
--- a/src/lex.c
+++ b/src/lex.c
@@ -164,7 +164,7 @@
 	assert(l);
 
 	l->last = l->t;
-	l->line += (l->i != 0 && l->buf[l->i] == '\n');
+	l->line += (l->i != 0 && l->buf[l->i - 1] == '\n');
 
 	if (l->last == BC_LEX_EOF) return bc_lex_err(l, BC_ERROR_PARSE_EOF);