1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Bug 415006 - Incorrect handling of empty string as program argument in

debug mode (CDI)
This commit is contained in:
Mikhail Khodjaiants 2013-08-13 16:16:58 -04:00
parent 9685809373
commit 767a83a455

View file

@ -22,6 +22,19 @@ package org.eclipse.cdt.debug.mi.core.command;
public class MIExecArguments extends MICommand
{
public MIExecArguments(String miVersion, String[] args) {
super(miVersion, "-exec-arguments", args); //$NON-NLS-1$
super(miVersion, "-exec-arguments", processArguments(args)); //$NON-NLS-1$
}
private static String[] processArguments(String[] args) {
String[] result = new String[args.length];
for (int i = 0; i < result.length; ++i) {
if (args[i].isEmpty()) {
result[i] = "''"; //$NON-NLS-1$
}
else {
result[i] = args[i];
}
}
return result;
}
}