Nicolas Cannasse hace 17 años
padre
commit
cfa4bdca0d
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      std/EReg.hx

+ 2 - 1
std/EReg.hx

@@ -113,7 +113,8 @@ class EReg {
 	**/
 	public function matched( n : Int ) : String {
 		#if neko
-			return new String(regexp_matched(r,n));
+			var m = regexp_matched(r,n);
+			return (m == null) ? null : new String(m);
 		#elseif js
 			return untyped if( r.m != null && n >= 0 && n < r.m.length ) r.m[n] else throw "EReg::matched";
 		#elseif flash9