This commit is contained in:
nub31
2025-06-02 14:31:05 +02:00
parent 8e522265ff
commit 9f7bc4d2d5
3 changed files with 13 additions and 31 deletions

View File

@@ -246,7 +246,7 @@ public class Lexer
{
var line = 1;
var column = 1;
for (var i = 0; i < index; i++)
for (var i = 0; i < Math.Min(index, _sourceText.Content.Length - 1); i++)
{
if (_sourceText.Content[i] == '\n')
{