(svn r22534) -Fix [FS#4631] (r21250): doing rescan_ai in a game with running AIs caused a crash

This commit is contained in:
yexo
2011-06-03 19:18:39 +00:00
parent b1812c9b02
commit cf11a1e98e
3 changed files with 18 additions and 5 deletions

View File

@@ -75,9 +75,9 @@ AIInfo *AIConfig::GetInfo() const
return this->info;
}
bool AIConfig::ResetInfo()
bool AIConfig::ResetInfo(bool force_exact_match)
{
this->info = AI::FindInfo(this->name, -1, false);
this->info = AI::FindInfo(this->name, force_exact_match ? this->version : -1, force_exact_match);
return this->info != NULL;
}