Navigation Menu

Skip to content

Commit

Permalink
Correct reading config files with \r\n
Browse files Browse the repository at this point in the history
  • Loading branch information
solomennikm committed Mar 1, 2017
1 parent e68e487 commit ba4b603
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ccutil/params.cpp
Expand Up @@ -72,7 +72,7 @@ bool ParamUtils::ReadParamsFromFp(FILE *fp, inT64 end_offset,

while ((end_offset < 0 || ftell(fp) < end_offset) &&
fgets(line, MAX_PATH, fp)) {
if (line[0] != '\n' && line[0] != '#') {
if (line[0] != '\r' && line[0] != '\n' && line[0] != '#') {
chomp_string(line); // remove newline
for (valptr = line; *valptr && *valptr != ' ' && *valptr != '\t';
valptr++);
Expand Down

0 comments on commit ba4b603

Please sign in to comment.