use find()

This commit is contained in:
Glenn Maynard
2005-12-21 08:46:30 +00:00
parent 902e2a5701
commit a89a488251
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1597,7 +1597,7 @@ void GameState::StoreRankingName( PlayerNumber pn, CString name )
}
line.MakeUpper();
if( !line.empty() && name.Find(line) != -1 ) // name contains a bad word
if( !line.empty() && name.find(line) != string::npos ) // name contains a bad word
{
LOG->Trace( "entered '%s' matches blacklisted item '%s'", name.c_str(), line.c_str() );
name = "";