From d6b52f6fb6ff42c3698389eb9c8939ce84cd726d Mon Sep 17 00:00:00 2001 From: EvilBeaver Date: Tue, 30 Nov 2021 07:54:12 +0300 Subject: [PATCH] probably closes #1130 --- src/OneScript.Language/LexicalAnalysis/SourceCodeIterator.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/OneScript.Language/LexicalAnalysis/SourceCodeIterator.cs b/src/OneScript.Language/LexicalAnalysis/SourceCodeIterator.cs index 975c5b074..d82d9e2c9 100644 --- a/src/OneScript.Language/LexicalAnalysis/SourceCodeIterator.cs +++ b/src/OneScript.Language/LexicalAnalysis/SourceCodeIterator.cs @@ -165,10 +165,8 @@ public bool SkipSpaces() public string ReadToLineEnd() { - while (MoveNext()) + while (_currentSymbol != '\n' && MoveNext()) { - if (_currentSymbol == '\n') - break; } var res = GetContents();