Require number of iterations to be at least 2

This commit is contained in:
Tom Deakin 2016-05-11 11:55:33 +01:00
parent 75ef78495c
commit 0f8f191d0e

View File

@ -290,6 +290,11 @@ void parseArguments(int argc, char *argv[])
std::cerr << "Invalid number of times." << std::endl; std::cerr << "Invalid number of times." << std::endl;
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
if (num_times < 2)
{
std::cerr << "Number of times must be 2 or more" << std::endl;
exit(EXIT_FAILURE);
}
} }
else if (!std::string("--float").compare(argv[i])) else if (!std::string("--float").compare(argv[i]))
{ {