ensure arg for -p

This commit is contained in:
whatdoineed2do/Ray 2023-09-25 11:21:42 +01:00
parent 72c42f66c9
commit 6989ae6c94

View File

@ -183,6 +183,10 @@ int CLI::parseCommandLine(int argc, char* argv[], Options* options) {
} }
i++; i++;
} else if (arg == "-p" || arg == "--productid") { } else if (arg == "-p" || arg == "--productid") {
if (i == argc -1) {
options->error = true;
break;
}
options->productid = argv[i+1]; options->productid = argv[i+1];
i++; i++;
} else if (arg == "-V" || arg == "--validate") { } else if (arg == "-V" || arg == "--validate") {