瀏覽代碼

use the whole args for single String argument

ncannasse 10 年之前
父節點
當前提交
bf8e888037
共有 1 個文件被更改,包括 2 次插入1 次删除
  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 )