1
0
Fork 0

strip trailing spaces & garbage

This commit is contained in:
mfranz 2005-06-13 19:27:40 +00:00
parent 639ed2161f
commit 72eecef8fa

View file

@ -1535,9 +1535,11 @@ fgParseOptions (const string& path) {
#endif #endif
// catch extraneous (DOS) line ending character // catch extraneous (DOS) line ending character
if ( line[line.length() - 1] < 32 ) { int i;
line = line.substr( 0, line.length()-1 ); for (i = line.length(); i > 0; i--)
} if (line[i - 1] > 32)
break;
line = line.substr( 0, i );
if ( parse_option( line ) == FG_OPTIONS_ERROR ) { if ( parse_option( line ) == FG_OPTIONS_ERROR ) {
cerr << endl << "Config file parse error: " << path << " '" cerr << endl << "Config file parse error: " << path << " '"