mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
made linereader work with window line endings. Closes #196
This commit is contained in:
parent
67e9f03f23
commit
a62a7413d1
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue