Fix invocation without arguments

Closes #29
This commit is contained in:
Michal Trojnara 2020-01-25 18:41:47 +01:00
parent 7366df707d
commit 2bb573219a

View File

@ -3068,20 +3068,18 @@ int main(int argc, char **argv) {
md = EVP_sha1(); md = EVP_sha1();
if (!strcmp(argv[1], "--help")) { if (argc > 1) {
printf(PACKAGE_STRING ", using:\n\t%s\n\t%s\n\n", if (!strcmp(argv[1], "--help")) {
SSLeay_version(SSLEAY_VERSION), printf(PACKAGE_STRING ", using:\n\t%s\n\t%s\n\n",
SSLeay_version(SSLEAY_VERSION),
#ifdef ENABLE_CURL #ifdef ENABLE_CURL
curl_version() curl_version()
#else #else
"no libcurl available" "no libcurl available"
#endif #endif
); );
help_for(argv0, "all"); help_for(argv0, "all");
} } else if (!strcmp(argv[1], "sign")) {
if (argc > 1) {
if (!strcmp(argv[1], "sign")) {
cmd = CMD_SIGN; cmd = CMD_SIGN;
argv++; argv++;
argc--; argc--;