Merge topic 'fix-check-build-system-crash'

3504f9b9 cmake: Fix --check-build-system argument count check (#14784)
This commit is contained in:
Brad King 2014-03-05 11:08:02 -05:00 committed by CMake Topic Stage
commit a8dced5856
1 changed files with 1 additions and 1 deletions

View File

@ -653,7 +653,7 @@ void cmake::SetArgs(const std::vector<std::string>& args,
cmSystemTools::ConvertToUnixSlashes(path);
this->SetHomeOutputDirectory(path.c_str());
}
else if((i < args.size()-1) && (arg.find("--check-build-system",0) == 0))
else if((i < args.size()-2) && (arg.find("--check-build-system",0) == 0))
{
this->CheckBuildSystemArgument = args[++i];
this->ClearBuildSystem = (atoi(args[++i].c_str()) > 0);