Browse Source

use the whole args for single String argument

ncannasse 10 years ago
parent
commit
bf8e888037
1 changed files with 2 additions and 1 deletions
  1. 2 1
      h2d/Console.hx

+ 2 - 1
h2d/Console.hx

@@ -262,7 +262,8 @@ class Console extends h2d.Sprite {
 					return;
 				}
 			case AString:
-				vargs.push(v);
+				// if we take a single string, let's pass the whole args (allows spaces)
+				vargs.push(cmd.args.length == 1 ? StringTools.trim(command.substr(args[0].length)) : v);
 			case AEnum(values):
 				var found = false;
 				for( v2 in values )