Skip to content

Commit

Permalink
Update command handler in test.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
noloader committed Aug 24, 2022
1 parent 84063b0 commit 5b1292d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ int scoped_main(int argc, char *argv[])
std::string command, executableName, macFilename;

if (argc < 2)
command = 'h';
command = "X-help";
else
command = argv[1];

Expand Down Expand Up @@ -423,10 +423,10 @@ int scoped_main(int argc, char *argv[])
HmacFile(argv[2], argv[3]);
else if (command == "ae")
AES_CTR_Encrypt(argv[2], argv[3], argv[4], argv[5]);
else if (command == "h")
else if (command == "h" || command == "X-help")
{
FileSource usage(DataDir("TestData/usage.dat").c_str(), true, new FileSink(std::cout));
return argc >= 2 && argv[1][0] == 'h' ? 0 : 1;
return command == "h" ? 0 : 1;
}
else if (command == "V")
{
Expand Down

0 comments on commit 5b1292d

Please sign in to comment.