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:
Robert Osfield
2005-01-03 12:27:58 +00:00
parent 8c5842115f
commit 89b8a8a921

View File

@@ -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;