Fixed k=0 issue

This commit is contained in:
Trianta 2023-12-08 22:51:44 -06:00
parent c19461fac2
commit be7ef06a2d

View File

@ -86,11 +86,11 @@ void Generator::SetArguments(const int argc, char* argv[]) {
} }
if (tempStr == "-k") { if (tempStr == "-k") {
setup.isPrefixSet = true; setup.isPrefixSet = true;
setup.prefixLength = std::stoi(argv[i+1]); setup.prefixLength = std::stoi(argv[i+1]) + 1;
} }
if (tempStr == "-n") { if (tempStr == "-n") {
setup.isOutputSet = true; setup.isOutputSet = true;
setup.outputLength = std::stoi(argv[i+1]); setup.outputLength = std::stoi(argv[i+1]) + 1;
} }
if (tempStr == "-h") { if (tempStr == "-h") {
PrintUsage(); PrintUsage();