diff --git a/Unity/Assets/ThirdParty/ILRuntime/ILRuntime/Runtime/Stack/StackObject.cs b/Unity/Assets/ThirdParty/ILRuntime/ILRuntime/Runtime/Stack/StackObject.cs index 9d7591edf5e88769656dcef4afe455d6c38ea112..c6107c5a42622c15d57c38383f53eba35452ad56 100644 --- a/Unity/Assets/ThirdParty/ILRuntime/ILRuntime/Runtime/Stack/StackObject.cs +++ b/Unity/Assets/ThirdParty/ILRuntime/ILRuntime/Runtime/Stack/StackObject.cs @@ -20,13 +20,19 @@ namespace ILRuntime.Runtime.Stack { get { - return (StackObject*)((uint)Value << 32 | (uint)this.ValueLow); + fixed (int* i = &this.Value) + { + ulong* p = (ulong*) i; + return (StackObject*) (*p); + } } set { - ulong v = (ulong) value; - this.ValueLow = (int)(v & 0x00000000ffffffff); - this.Value = (int)(v >> 32); + fixed (int* i = &this.Value) + { + ulong* p = (ulong*) i; + *p = (ulong)value; + } } }