From 9a92d6fd774221d66f5d6fdab17b517180535a6b Mon Sep 17 00:00:00 2001 From: JF Bastien Date: Mon, 4 Jan 2016 11:30:07 -0800 Subject: Fix off-by-one in option parsing with '='. --- src/support/command-line.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/support/command-line.cpp b/src/support/command-line.cpp index 40e11f60a..659c055c9 100644 --- a/src/support/command-line.cpp +++ b/src/support/command-line.cpp @@ -97,7 +97,7 @@ void Options::parse(int argc, const char *argv[]) { auto equal = currentOption.find_first_of('='); if (equal != std::string::npos) { argument = currentOption.substr(equal + 1); - currentOption = currentOption.substr(0, equal - 1); + currentOption = currentOption.substr(0, equal); } Option *option = nullptr; for (auto &o : options) -- cgit v1.2.3