From ba4b60374d750e81f263776aa47a8d33b73accfe Mon Sep 17 00:00:00 2001 From: Mikhail Solomennik Date: Wed, 1 Mar 2017 14:41:17 +0300 Subject: [PATCH] Correct reading config files with \r\n --- ccutil/params.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccutil/params.cpp b/ccutil/params.cpp index c8dd3514e5..30604f1129 100644 --- a/ccutil/params.cpp +++ b/ccutil/params.cpp @@ -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++);