Skip to content

Commit

Permalink
Carriage return should properly increase line number again.
Browse files Browse the repository at this point in the history
  • Loading branch information
WhyIsEvery4thYearAlwaysBad authored and WhyIsEvery4thYearAlwaysBad committed Apr 11, 2021
1 parent 406cc59 commit 593c154
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ namespace Lexer {
break;
case '\r':
iLineColumn=1u;
if (i+1==p_sInStr.length() || p_sInStr.at(i+1)!='\n') iLineNum++;
if ((i+1)<p_sInStr.length() && p_sInStr.at(i+1)!='\n') iLineNum++;
i++;
break;
case '\v':
Expand Down

0 comments on commit 593c154

Please sign in to comment.