Skip to content

Commit c5a9287

Browse files
committed
fix: if the longest line is the last one with no terminating zero then lexer failed to account for it.
1 parent 7eefb5c commit c5a9287

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/source/pl/core/lexer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ namespace pl::core {
651651

652652
m_cursor++;
653653
}
654-
654+
m_longestLineLength = std::max(m_longestLineLength, m_cursor - m_lineBegin);
655655
addToken(makeToken(Separator::EndOfProgram, 0));
656656

657657
return { m_tokens, collectErrors() };

0 commit comments

Comments
 (0)