From 8245157682a635387707f96c8f0b588534e8fcdf Mon Sep 17 00:00:00 2001 From: Zae Date: Tue, 13 Feb 2024 12:19:48 +0800 Subject: [PATCH] C#: Fix missing CowData 64-bit promotion for `PackedInt32Array`. --- .../GodotSharp/GodotSharp/Core/NativeInterop/InteropStructs.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/InteropStructs.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/InteropStructs.cs index a1a011e0f019..a8642a916cce 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/InteropStructs.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/InteropStructs.cs @@ -962,7 +962,7 @@ public readonly unsafe int* Buffer public readonly unsafe int Size { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => _ptr != null ? *(_ptr - 1) : 0; + get => _ptr != null ? (int)(*((ulong*)_ptr - 1)) : 0; } }