From: serassio <> Date: Mon, 25 Apr 2005 21:46:35 +0000 (+0000) Subject: Handle DOS/Windows formatted config file with wrong line terminators X-Git-Tag: SQUID_3_0_PRE4~792 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d866e2ad2712fb0f470d921042e0381bdf3bad0f;p=thirdparty%2Fsquid.git Handle DOS/Windows formatted config file with wrong line terminators --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index dea4b85e8f..deea028773 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.cc,v 1.470 2005/04/23 12:28:11 serassio Exp $ + * $Id: cache_cf.cc,v 1.471 2005/04/25 15:46:35 serassio Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -298,6 +298,9 @@ parseConfigFile(const char *file_name) if ((token = strchr(config_input_line, '\n'))) *token = '\0'; + if ((token = strchr(config_input_line, '\r'))) + *token = '\0'; + if (strncmp(config_input_line, "#line ", 6) == 0) { static char new_file_name[1024]; static char *file;