From 029c5009a9d9cb536c7485d0ac2deb96e4b3117b Mon Sep 17 00:00:00 2001 From: player-03 Date: Sun, 19 Oct 2014 01:50:30 -0700 Subject: [PATCH] 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. --- tools/platforms/FlashPlatform.hx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tools/platforms/FlashPlatform.hx b/tools/platforms/FlashPlatform.hx index a6f617e27..058d37230 100644 --- a/tools/platforms/FlashPlatform.hx +++ b/tools/platforms/FlashPlatform.hx @@ -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) {