1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Only pass -- if an argument starts with '-'

This commit is contained in:
Alain Magloire 2002-10-02 04:54:20 +00:00
parent bdee45066b
commit aeb2c89c90

View file

@ -85,8 +85,14 @@ public class MICommand extends Command
} }
} }
if (parameters != null && parameters.length > 0) { if (parameters != null && parameters.length > 0) {
// Add a "--" separator if a parameter starts with "-"
if (options != null && options.length > 0) { 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++) { for (int i = 0; i < parameters.length; i++) {
// According to the MI documentation '-' is not permitted // According to the MI documentation '-' is not permitted