From a62a7413d1ff25c8e07657b96a485f001004619a Mon Sep 17 00:00:00 2001 From: oy Date: Fri, 1 Oct 2010 12:43:44 +0200 Subject: [PATCH] made linereader work with window line endings. Closes #196 --- src/engine/shared/linereader.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/engine/shared/linereader.cpp b/src/engine/shared/linereader.cpp index b3de233ba..78b574be4 100644 --- a/src/engine/shared/linereader.cpp +++ b/src/engine/shared/linereader.cpp @@ -51,6 +51,8 @@ char *CLineReader::Get() if(m_aBuffer[m_BufferPos] == '\n' || m_aBuffer[m_BufferPos] == '\r') { // line found + if(m_aBuffer[m_BufferPos] == '\r' && m_BufferPos+1 < m_BufferSize && m_aBuffer[m_BufferPos+1] == '\n') + m_aBuffer[m_BufferPos++] = 0; m_aBuffer[m_BufferPos] = 0; m_BufferPos++; return &m_aBuffer[LineStart];