From e885cf71c6595eb27bff15b399809c8905e542ee Mon Sep 17 00:00:00 2001 From: Michael Insel Date: Tue, 12 Jun 2018 19:02:48 +0200 Subject: [PATCH] Fix program option parsing This fixes the program option parsing. --- lib/cli/clicommand.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cli/clicommand.cpp b/lib/cli/clicommand.cpp index ece65d4e6..069597ad9 100644 --- a/lib/cli/clicommand.cpp +++ b/lib/cli/clicommand.cpp @@ -186,7 +186,7 @@ bool CLICommand::ParseCommand(int argc, char **argv, po::options_description& vi std::vector::size_type i; int k; for (i = 0, k = 1; i < vname.size() && k < argc; i++, k++) { - if (strncmp(argv[k], "--", 2) == 0) { + if (strncmp(argv[k], "-", 1) == 0 || strncmp(argv[k], "--", 2) == 0) { i--; continue; }