Browse Source

Merge pull request #88268 from zaevi/dotnet/fix_64bit_promotion

C#: Fix missing CowData 64-bit promotion for `PackedInt32Array`.
Rémi Verschelde 1 year ago
parent
commit
fb688b38d1

+ 1 - 1
modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/InteropStructs.cs

@@ -962,7 +962,7 @@ namespace Godot.NativeInterop
         public readonly unsafe int Size
         {
             [MethodImpl(MethodImplOptions.AggressiveInlining)]
-            get => _ptr != null ? *(_ptr - 1) : 0;
+            get => _ptr != null ? (int)(*((ulong*)_ptr - 1)) : 0;
         }
     }