From: curt Date: Wed, 22 Jul 1998 01:27:03 +0000 (+0000) Subject: Strip out \r when parsing config file in case we are on a windoze system. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=47beea24fbb0dabcf14f5a1b5be0307088794f30;p=flightgear.git Strip out \r when parsing config file in case we are on a windoze system. --- diff --git a/Main/options.cxx b/Main/options.cxx index 314dbe576..bafe1cc4c 100644 --- a/Main/options.cxx +++ b/Main/options.cxx @@ -392,6 +392,12 @@ int fgOPTIONS::parse_config_file( char *path ) { line[len-1] = '\0'; } + // strip dos ^M if it exists + len = strlen(line); + if ( line[len-1] == '\r' ) { + line[len-1] = '\0'; + } + result = parse_option(line); if ( result == FG_OPTIONS_ERROR ) { fgPrintf( FG_GENERAL, FG_EXIT, @@ -488,6 +494,9 @@ fgOPTIONS::~fgOPTIONS( void ) { // $Log$ +// Revision 1.18 1998/07/22 01:27:03 curt +// Strip out \r when parsing config file in case we are on a windoze system. +// // Revision 1.17 1998/07/16 17:33:38 curt // "H" / "h" now control hud brightness as well with off being one of the // states.