- Fix a display bug when displaying binutils version.

svn path=/trunk/; revision=30761
This commit is contained in:
Peter Ward
2007-11-25 21:12:24 +00:00
parent bacd01ad48
commit 7f657113f7

View File

@@ -840,6 +840,7 @@ MingwBackend::GetVersionString ( const string& versionCommand )
{
FILE *fp;
int ch, i;
size_t newline;
char buffer[81];
fp = popen ( versionCommand.c_str () , "r" );
@@ -865,6 +866,8 @@ MingwBackend::GetVersionString ( const string& versionCommand )
{
prevtoken = token;
version = string( prevtoken );
if ( (newline = version.find('\n')) != std::string::npos )
version.erase(newline, 1);
if ( version.find('.') != std::string::npos )
break;
token = strtok ( NULL, separators );