commit | 561587984d496cbdc6827e16337f7c7c72fa6e5b | [log] [tgz] |
---|---|---|
author | Gavin Howard <yzena.tech@gmail.com> | Mon Jan 14 12:03:14 2019 -0700 |
committer | Gavin Howard <yzena.tech@gmail.com> | Mon Jan 14 12:03:14 2019 -0700 |
tree | db342cdcf8e5dfbae2da48901395e4f0538e1040 | |
parent | 057c3e8b9b2c78085a75573d54c6346b531df3d0 [diff] [blame] |
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);