From 246d9f1440cc7b813d3578a3ec9d3019544cdd17 Mon Sep 17 00:00:00 2001 From: tanghai Date: Tue, 18 Dec 2018 11:54:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E4=BD=BF=E7=94=A8=E6=8C=87?= =?UTF-8?q?=E9=92=88=E8=BD=AC=E6=8D=A2=EF=BC=8C=E6=8F=90=E5=8D=87=E6=80=A7?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ILRuntime/Runtime/Stack/StackObject.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Unity/Assets/ThirdParty/ILRuntime/ILRuntime/Runtime/Stack/StackObject.cs b/Unity/Assets/ThirdParty/ILRuntime/ILRuntime/Runtime/Stack/StackObject.cs index 9d7591ed..c6107c5a 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; + } } } -- GitLab