소스 검색

fixed toNativeInt for Neko (no overflow)

Nicolas Cannasse 16 년 전
부모
커밋
4c308220fd
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      std/haxe/Int32.hx

+ 1 - 1
std/haxe/Int32.hx

@@ -57,7 +57,7 @@ class Int32 {
 
 	public static inline function toNativeInt( x : Int32 ) : Int {
 		#if neko
-		return try untyped __i32__to_int(x) catch( e : Dynamic ) throw "Overflow"+x;
+		return untyped (__i32__ushr(x,8) << 8) | __i32__and(x,0xFF);
 		#else
 		return cast x;
 		#end