summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/Options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/Options.cpp')
-rw-r--r--cpp/src/qpid/Options.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/qpid/Options.cpp b/cpp/src/qpid/Options.cpp
index e521b1220a..cc48323266 100644
--- a/cpp/src/qpid/Options.cpp
+++ b/cpp/src/qpid/Options.cpp
@@ -55,7 +55,8 @@ struct EnvOptMapper {
}
static bool matchStr(const string& env, boost::shared_ptr<po::option_description> desc) {
- return std::equal(env.begin(), env.end(), desc->long_name().begin(), &matchChar);
+ return desc->long_name().size() == env.size() &&
+ std::equal(env.begin(), env.end(), desc->long_name().begin(), &matchChar);
}
static bool matchCase(const string& env, boost::shared_ptr<po::option_description> desc) {