From b420b98d633f16b0905295345cb671b2834b956e Mon Sep 17 00:00:00 2001 From: garak Date: Thu, 29 Aug 2019 10:02:56 -0400 Subject: [PATCH] allow CRLF line endings in asm files for preproc --- tools/preproc/asm_file.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/preproc/asm_file.cpp b/tools/preproc/asm_file.cpp index 383010aa3..98805c952 100644 --- a/tools/preproc/asm_file.cpp +++ b/tools/preproc/asm_file.cpp @@ -475,9 +475,11 @@ void AsmFile::ExpectEmptyRestOfLine() m_lineStart = m_pos; m_lineNum++; } - else if (m_buffer[m_pos] == '\r') + else if (m_buffer[m_pos] == '\r' && m_buffer[m_pos + 1] == '\n') { - RaiseError("only Unix-style LF newlines are supported"); + m_pos += 2; + m_lineStart = m_pos; + m_lineNum++; } else {