Extra i++ led to a "double skip" when parsing a \r\n pair. So a DOS
file would look like it was all on one line, and a comment would skip to the end of the file.
This commit is contained in:
@@ -58,7 +58,6 @@ static int* findLines(struct Parser* p)
|
|||||||
|
|
||||||
// Skip over the \r of a \r\n pair.
|
// Skip over the \r of a \r\n pair.
|
||||||
if(buf[i] == '\r' && (i+1)<p->len && buf[i+1] == '\n') {
|
if(buf[i] == '\r' && (i+1)<p->len && buf[i+1] == '\n') {
|
||||||
i++;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Reallocate if necessary
|
// Reallocate if necessary
|
||||||
|
|||||||
Reference in New Issue
Block a user