fix bug in GetBinutilsVersion()

svn path=/trunk/; revision=17836
This commit is contained in:
Royce Mitchell III 2005-09-13 19:04:24 +00:00
parent 7f94d6e5bf
commit 130efbb545

View file

@ -865,7 +865,7 @@ MingwBackend::GetBinutilsVersion ( const string& binutilsCommand )
string version = string ( prevtoken ); string version = string ( prevtoken );
int firstSpace = version.find_last_not_of ( " \t" ); int firstSpace = version.find_last_not_of ( " \t" );
if ( firstSpace != -1 ) if ( firstSpace != -1 )
return string ( version, 0, firstSpace - 1); return string ( version, 0, firstSpace);
else else
return version; return version;
} }
@ -910,7 +910,7 @@ MingwBackend::DetectBinutils ()
} }
if ( detectedBinutils ) if ( detectedBinutils )
{ {
const string& binutilsVersion = GetBinutilsVersion ( binutilsCommand ); string binutilsVersion = GetBinutilsVersion ( binutilsCommand );
if ( IsSupportedBinutilsVersion ( binutilsVersion ) ) if ( IsSupportedBinutilsVersion ( binutilsVersion ) )
printf ( "detected (%s)\n", binutilsCommand.c_str () ); printf ( "detected (%s)\n", binutilsCommand.c_str () );
else else