From 783121ed5eb4494cf835f1f63510a76a306ac746 Mon Sep 17 00:00:00 2001 From: Martchus Date: Tue, 14 Jun 2016 23:11:13 +0200 Subject: [PATCH] Allow implicit usage of arg only once --- application/argumentparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/argumentparser.cpp b/application/argumentparser.cpp index d3172cf..0578eab 100644 --- a/application/argumentparser.cpp +++ b/application/argumentparser.cpp @@ -521,7 +521,7 @@ void ArgumentParser::readSpecifiedArgs(ArgumentVector &args, std::size_t &index, if(!matchingArg) { // use the first default argument for(Argument *arg : args) { - if(arg->isImplicit()) { + if(arg->isImplicit() && !arg->isPresent()) { (matchingArg = arg)->m_indices.push_back(index); break; }