From 018aff41fb597bcff7867c5eb876f068cb8eb356 Mon Sep 17 00:00:00 2001
From: Rashad Kanavath <rashad.kanavath@c-s.fr>
Date: Mon, 11 May 2015 10:42:00 +0200
Subject: [PATCH] BUG: mantis #1026. allow -- for parameter values

---
 .../Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx b/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx
index 7fba8d1b12..9dae6317d6 100644
--- a/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx
+++ b/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx
@@ -900,7 +900,7 @@ bool CommandLineLauncher::CheckParametersPrefix()
   // Check if the chain " --" appears in the args, could be a common mistake
   for (std::vector<std::string>::iterator it = m_VExpression.begin(); it != m_VExpression.end(); ++it)
     {
-    if (it->find("--") != std::string::npos )
+    if (it->compare(0, 2, "--") == 0 )
       {
       return false;
       }
-- 
GitLab