Fixed potential missing argument when using tv subcommand with argv[2]
parent
5b1f23c310
commit
15d312e986
2
test.cpp
2
test.cpp
|
|
@ -251,7 +251,7 @@ int CRYPTOPP_API main(int argc, char *argv[])
|
|||
DigestFile(argv[2]);
|
||||
else if (command == "tv")
|
||||
{
|
||||
std::string fname = argv[2];
|
||||
std::string fname = (argc >= 3 ? argv[2] : "all");
|
||||
if (fname.find(".txt") == std::string::npos)
|
||||
fname = "TestVectors/" + fname + ".txt";
|
||||
return !RunTestDataFile(fname.c_str());
|
||||
|
|
|
|||
Loading…
Reference in New Issue