Ver Fonte

[eval] fix haxe.Int64 to native Int64 conversion (#10800)

Aurel há 3 anos atrás
pai
commit
555cbff713
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      src/macro/eval/evalIntegers.ml

+ 2 - 2
src/macro/eval/evalIntegers.ml

@@ -29,7 +29,7 @@ let decode_haxe_i64 v =
 		let high = decode_i32 (vi.ifields.(get_instance_field_index_raise vi.iproto key_high))
 		and low = decode_i32 (vi.ifields.(get_instance_field_index_raise vi.iproto key_low)) in
 		let high64 = GInt64.shift_left (Int32.to_int64 high) 32
-		and low64 = Int32.to_int64 low in
+		and low64 = GInt64.logand (Int32.to_int64 low) 0xffffffffL in
 		GInt64.logor high64 low64
 	| _ ->
 		unexpected_value v "haxe.Int64"
@@ -267,4 +267,4 @@ let int64_fields = [
 		let i = decode_i64 v in
 		VInt64 (Int64.lognot i)
 	);
-]
+]