From 1f099a07dc9dcbb0954f713fc0fc98115fd7b827 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Wed, 1 Oct 2014 02:49:25 +1000 Subject: [PATCH] Changed the command line argument's requirements --- common/utilities/config_utility.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/utilities/config_utility.cpp b/common/utilities/config_utility.cpp index e6f9f39..fedf7e0 100644 --- a/common/utilities/config_utility.cpp +++ b/common/utilities/config_utility.cpp @@ -53,15 +53,15 @@ void ConfigUtility::Load(std::string fname, int argc, char* argv[]) { } //set some specific values - if (!strncmp(argv[i], "-C", 2)) { + if (!strncmp(argv[i], "-", 1)) { //wipe the variables memset(key, 0, 256); memset(key, 0, 256); //read the key-value pair - if (sscanf(argv[i], "-C%[^=]=%[^\0]", key, val) != 2) { + if (sscanf(argv[i], "-%[^=]=%[^\0]", key, val) != 2) { std::ostringstream os; - os << "Failed to read a command line config argument (expected -C%s=%s):" << std::endl; + os << "Failed to read a command line config argument (expected -%s=%s):" << std::endl; os << "\targv[" << i << "]: " << argv[i] << std::endl; os << "\tkey: " << key << std::endl; os << "\tval: " << val << std::endl;