Quellcode durchsuchen

[java/cs] fixed Int64 make sign extension

Caue Waneck vor 12 Jahren
Ursprung
Commit
3679c3b764
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 1 1
      std/cs/_std/haxe/Int64.hx
  2. 1 1
      std/java/_std/haxe/Int64.hx

+ 1 - 1
std/cs/_std/haxe/Int64.hx

@@ -33,7 +33,7 @@ using haxe.Int64;
 
 	public static inline function make( high : Int, low : Int ) : Int64
 	{
-		return ((cast(high, NativeInt64) << 32 ) | (cast(low, NativeInt64))).ofNative();
+		return ((cast(high, NativeInt64) << 32 ) | (low & untyped __cs__('0xffffffffL'))).ofNative();
 	}
 
 	public static inline function getLow( x : Int64 ) : Int

+ 1 - 1
std/java/_std/haxe/Int64.hx

@@ -32,7 +32,7 @@ private typedef NativeInt64 = Int;
 
 	public static inline function make( high : Int, low : Int ) : Int64
 	{
-		return ((cast(high, NativeInt64) << 32 ) | (cast(low, NativeInt64))).ofNative();
+		return ((cast(high, NativeInt64) << 32 ) | (low & untyped __java__('0xffffffffL'))).ofNative();
 	}
 
 	public static inline function getLow( x : Int64 ) : Int