Merge pull request #246 from player-03/master

Merge consecutive arguments that don't start with -
This commit is contained in:
Joshua Granick
2014-10-20 09:28:57 -07:00

View File

@@ -67,10 +67,9 @@ class FlashPlatform extends PlatformTarget {
}
hxml = StringTools.replace (hxml, "\n", " ");
hxml = StringTools.trim (hxml);
var args = hxml.split (" ");
var args = new EReg ("\\s+", "g").split (hxml);
var strip;
while ((strip = args.indexOf ("-swf-header")) > -1) {
@@ -79,6 +78,23 @@ class FlashPlatform extends PlatformTarget {
}
var index = 1;
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) {
@@ -298,4 +314,4 @@ class FlashPlatform extends PlatformTarget {
@ignore public override function trace ():Void {}
@ignore public override function uninstall ():Void {}
}
}