Fix but with negative splitting

This commit is contained in:
NaiJi ✨ 2020-12-18 23:29:03 +03:00
parent 855eb9b5dc
commit f3be53050e
1 changed files with 3 additions and 1 deletions

View File

@ -78,7 +78,8 @@ static std::tuple<int, int, std::string> parseInput(int argc, char **argv)
case NO_ARGC:
{
// Just launch the application with default parameters
std::cout << "No arguments given. Launching at \"" + DEFAULT_PATH + "\" with splitting " + std::to_string(DEFAULT_SPLITTING) + "\n";
std::cout << "No arguments given. Launching at \"" << DEFAULT_PATH << "\" with splitting " << std::to_string(DEFAULT_SPLITTING) << "\n"
<< "--help for more information.\n";
const auto &[ret_code, ret_path] = parsePath(DEFAULT_PATH);
if (ret_code)
@ -109,6 +110,7 @@ static std::tuple<int, int, std::string> parseInput(int argc, char **argv)
// full stack
if (strcmp(argv[1], output::SPLITTING_FLAG) == 0)
{
splitting = -1; // here assuming user is providing it on their own
if (std::isdigit(*argv[2]))
splitting = std::stoi(argv[2]);