2
0
Эх сурвалжийг харах

use the whole args for single String argument

ncannasse 10 жил өмнө
parent
commit
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;
 					return;
 				}
 				}
 			case AString:
 			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):
 			case AEnum(values):
 				var found = false;
 				var found = false;
 				for( v2 in values )
 				for( v2 in values )