Browse Source

Use Std.int on c, to convert from Null<Int>

Hugh Sanderson 15 years ago
parent
commit
88935e2828
1 changed files with 1 additions and 1 deletions
  1. 1 1
      std/EReg.hx

+ 1 - 1
std/EReg.hx

@@ -295,7 +295,7 @@ class EReg {
 					var c = k.charCodeAt(0);
 					var c = k.charCodeAt(0);
 					// 1...9
 					// 1...9
 					if( c >= 49 && c <= 57 ) {
 					if( c >= 49 && c <= 57 ) {
-						var p = try regexp_matched_pos(r,c-48) catch( e : String ) null;
+						var p = try regexp_matched_pos(r,Std.int(c)-48) catch( e : String ) null;
 						if( p == null ){
 						if( p == null ){
 							b.add("$");
 							b.add("$");
 							b.add(k);
 							b.add(k);