Commit 3ba19894 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠

orcparse: handle win32 \r\n line endings

parent 87441e15
......@@ -452,6 +452,10 @@ orc_parse_get_line (OrcParser *parser)
memcpy (parser->line, parser->p, n);
parser->line[n] = 0;
/* windows text files might have \r\n as line ending */
if (n > 0 && parser->line[n - 1] == '\r')
parser->line[n - 1] = 0;
parser->p = end;
if (parser->p[0] == '\n') {
parser->p++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment