diff options
author | Seth Barberee <seth.barberee@gmail.com> | 2020-12-17 13:17:58 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-17 13:17:58 -0600 |
commit | 096de8d9b2ffd90c52e790296bfd7c5436d45ca3 (patch) | |
tree | 9c5af2e04dea05221c71946a5dfc06471f77801d /tools/preproc/asm_file.cpp | |
parent | bc504264f1e54b3c1e482710c592e5549828bfe1 (diff) | |
parent | f90f3affeb9b0a66aa7df68f5fdecd692033faf9 (diff) |
Merge pull request #12 from SethBarberee/master
Merge work from SethBarberee/pmd-red into pret.
Diffstat (limited to 'tools/preproc/asm_file.cpp')
-rw-r--r-- | tools/preproc/asm_file.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/preproc/asm_file.cpp b/tools/preproc/asm_file.cpp index 383010a..7756cad 100644 --- a/tools/preproc/asm_file.cpp +++ b/tools/preproc/asm_file.cpp @@ -20,6 +20,7 @@ #include <cstdio> #include <cstdarg> +#include <stdexcept> #include "preproc.h" #include "asm_file.h" #include "char_util.h" @@ -475,9 +476,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 { |