diff options
| author | Gordon Sim <gsim@apache.org> | 2009-06-25 17:06:51 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2009-06-25 17:06:51 +0000 |
| commit | 89c9507bf7594f34110b085317d464131870eb5f (patch) | |
| tree | e0c69637e0ad9454aaf29878650154a04a866b03 /qpid/cpp/src | |
| parent | 35a97b0cf995af29b85aa47b8c08612ad8d72830 (diff) | |
| download | qpid-python-89c9507bf7594f34110b085317d464131870eb5f.tar.gz | |
Require exact match for environment variables before they are interpreted as options (rather than simply matching as a prefix to an option name).
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@788439 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/Options.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/Options.cpp b/qpid/cpp/src/qpid/Options.cpp index e521b1220a..cc48323266 100644 --- a/qpid/cpp/src/qpid/Options.cpp +++ b/qpid/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) { |
