From aeb2c89c9006756db41323c5357f380f95a4c7c8 Mon Sep 17 00:00:00 2001 From: Alain Magloire Date: Wed, 2 Oct 2002 04:54:20 +0000 Subject: [PATCH] Only pass -- if an argument starts with '-' --- .../org/eclipse/cdt/debug/mi/core/command/MICommand.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MICommand.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MICommand.java index ab5ce61856c..f9f23bdd22b 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MICommand.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MICommand.java @@ -85,8 +85,14 @@ public class MICommand extends Command } } if (parameters != null && parameters.length > 0) { + // Add a "--" separator if a parameter starts with "-" if (options != null && options.length > 0) { - command += " --"; + for (int i = 0; i < parameters.length; i++) { + if (parameters[i].startsWith("-")) { + command += " --"; + break; + } + } } for (int i = 0; i < parameters.length; i++) { // According to the MI documentation '-' is not permitted