Added stripping of trailing spaces to readline call to fix problems associated
with eroneous spaces hanging around at ends of lines causing string matching problems
This commit is contained in:
@@ -88,6 +88,13 @@ bool Model::readline(std::istream& fin, char* line, const int LINE_SIZE)
|
||||
|
||||
|
||||
}
|
||||
|
||||
// strip trailing spaces
|
||||
while (ptr>line && *(ptr-1)==' ')
|
||||
{
|
||||
--ptr;
|
||||
}
|
||||
|
||||
*ptr = 0;
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user