aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--args.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/args.hxx b/args.hxx
index 3a43f18..c03f381 100644
--- a/args.hxx
+++ b/args.hxx
@@ -1018,10 +1018,10 @@ namespace args
ArgFlagBase *argbase = dynamic_cast<ArgFlagBase *>(base);
if (argbase)
{
- argchunk.erase(std::begin(argchunk), ++argit);
- if (!argchunk.empty())
+ const std::string arg(++argit, std::end(argchunk));
+ if (!arg.empty())
{
- argbase->ParseArg(argchunk);
+ argbase->ParseArg(arg);
} else
{
++it;