Merge consecutive arguments that don't start with -

Otherwise, if the app title contains a space, it'll be passed as two separate arguments and Haxe won't know what to do with it.
This commit is contained in:
player-03
2014-10-19 01:50:30 -07:00
parent 4d3a2fd1cd
commit 029c5009a9

View File

@@ -78,6 +78,23 @@ class FlashPlatform extends PlatformTarget {
}
var index = 2;
while (index < args.length) {
if (!StringTools.startsWith (args[index - 1], "-") && !StringTools.startsWith (args[index], "-")) {
args[index - 1] += " " + args[index];
args.splice (index, 1);
} else {
index++;
}
}
if (PlatformHelper.hostPlatform != Platform.WINDOWS) {
for (i in 0...args.length) {