summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/PropertiesI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/PropertiesI.cpp')
-rw-r--r--cpp/src/Ice/PropertiesI.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/cpp/src/Ice/PropertiesI.cpp b/cpp/src/Ice/PropertiesI.cpp
index f6e70233ce9..44874bc6623 100644
--- a/cpp/src/Ice/PropertiesI.cpp
+++ b/cpp/src/Ice/PropertiesI.cpp
@@ -116,12 +116,19 @@ Ice::PropertiesI::getCommandLineOptions()
StringSeq
Ice::PropertiesI::parseCommandLineOptions(const string& prefix, const StringSeq& options)
{
+ string pfx = prefix;
+ if(!pfx.empty() && pfx[pfx.size() - 1] != '.')
+ {
+ pfx += '.';
+ }
+ pfx = "--" + pfx;
+
StringSeq result;
StringSeq::size_type i;
for(i = 0; i < options.size(); i++)
{
string opt = options[i];
- if(opt.find("--" + prefix + ".") == 0)
+ if(opt.find(pfx) == 0)
{
if(opt.find('=') == string::npos)
{