strip trailing spaces & garbage
This commit is contained in:
parent
639ed2161f
commit
72eecef8fa
1 changed files with 5 additions and 3 deletions
|
@ -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 << " '"
|
||||||
|
|
Loading…
Reference in a new issue