Skip to content

Commit cc57d27

Browse files
committed
add comments
1 parent e5bbe96 commit cc57d27

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/fread.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2309,6 +2309,7 @@ int freadMain(freadMainArgs _args)
23092309
ch = skip_to_eol(commentPos, eof);
23102310
}
23112311
}
2312+
// consider different cases line ending after column names
23122313
if (ch == eof || *ch == '\0') {
23132314
pos = ch;
23142315
} else if (*ch == '\n' || *ch == '\r') {
@@ -2318,7 +2319,7 @@ int freadMain(freadMainArgs _args)
23182319
} else {
23192320
INTERNAL_STOP("reading colnames ending on '%c'", *ch); // # nocov
23202321
}
2321-
} else if (ch > sof && (ch[-1] == '\n' || ch[-1] == '\r')) {
2322+
} else if (ch > sof && (ch[-1] == '\n' || ch[-1] == '\r')) { // trimmed a comment and now on next rows first byte
23222323
pos = ch;
23232324
} else {
23242325
INTERNAL_STOP("reading colnames ending on '%c'", *ch); // # nocov

0 commit comments

Comments
 (0)