瀏覽代碼

fixed RMulti with blank pcdata

Nicolas Cannasse 18 年之前
父節點
當前提交
bc7d81bec3
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      std/haxe/xml/Check.hx

+ 6 - 2
std/haxe/xml/Check.hx

@@ -178,13 +178,17 @@ class Check {
 					return CMissing(r);
 			return CMatch;
 		case RMulti(r,one):
-			if( one && !it.hasNext() )
-				return CMissing(r);
+			var found = false;
 			for( x in it ) {
+				if( isBlank(x) )
+					continue;
 				var m = checkList([x].iterator(),r);
 				if( m != CMatch )
 					return m;
+				found = true;
 			}
+			if( one && !found )
+				return CMissing(r);
 			return CMatch;
 		default:
 			var found = false;