diff --git a/tools/platforms/FlashPlatform.hx b/tools/platforms/FlashPlatform.hx index fbba8c1b4..cc6656261 100644 --- a/tools/platforms/FlashPlatform.hx +++ b/tools/platforms/FlashPlatform.hx @@ -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 {} -} \ No newline at end of file +}