Explorar o código

[java] fixes charCodeAt for surrogate characters, matches the c# behaviour

frabbit %!s(int64=8) %!d(string=hai) anos
pai
achega
e2d4dab194
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      std/java/internal/StringExt.hx

+ 1 - 1
std/java/internal/StringExt.hx

@@ -42,7 +42,7 @@ private typedef NativeString = String;
 			if ( index >= me.length() || index < 0 )
 				return null;
 			else
-				return me.codePointAt(index);
+				return (int) me.charAt(index);
 	')
 	public static function charCodeAt(me:NativeString, index:Int):Null<Int>
 	{