From c9d6cf0b5e4487b0116c6d834f39a62964e29ef2 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Thu, 21 Jul 2022 09:39:45 +0200 Subject: [PATCH] lib/cli: minor consistency changes --- src/lib/cli.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/cli.cpp b/src/lib/cli.cpp index 7e695f5..8ec37c9 100644 --- a/src/lib/cli.cpp +++ b/src/lib/cli.cpp @@ -144,7 +144,7 @@ namespace CLI { argumentWaitingForValue = argumentsByShortName[argument[j]]; if (i+1 == argc) { this->wrongUsage = true; - this->wrongUsageMessages.push_back(std::string("Argument expects value but has none: ")+argument.substr(j, 1)); + this->wrongUsageMessages.push_back(std::string("Argument expects value but has none: ")+this->argumentsByShortName[argument[j]]->longName); } } else { //assume the rest of the argv is a concatenated argument value @@ -171,7 +171,7 @@ namespace CLI { this->positionalArguments.at(positionalArgumentCounter).value = argument; } else { this->wrongUsage = true; - this->wrongUsageMessages.push_back(std::string("Too many positional arguments. Unexpected encounter of: ")+argument); + this->wrongUsageMessages.push_back(std::string("Too many positional arguments! Unexpected encounter of: ")+argument); } positionalArgumentCounter++; } else {