Skip to content

Commit 0fb7bfe

Browse files
committed
Normalize CR/CRLF to LF in macro and IFMACRO body readers
1 parent 98cdca3 commit 0fb7bfe

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/fflib/lex.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,7 @@ bool mylex::SetMacro(int &ret)
787787
{
788788
linenumber++;
789789
nl=1;
790+
i = '\n'; // normalize CR/CRLF to LF so stored body always uses '\n'
790791
}
791792
else if(isalpha(i) && isalpha(ii) ) // Modif F.H
792793
{
@@ -1031,6 +1032,7 @@ bool mylex::IFMacro(int &ret)
10311032
{
10321033
linenumber++;
10331034
nl=1;
1035+
i = '\n'; // normalize CR/CRLF to LF so stored body always uses '\n'
10341036
}
10351037
//
10361038
else if(isalpha(i) && isalpha(ii) ) // Modif F.H

0 commit comments

Comments
 (0)