From a4a885680f6fdf2325f3d50a078df71c8ba7343b Mon Sep 17 00:00:00 2001 From: yck1509 Date: Sun, 6 Dec 2015 19:37:13 +0800 Subject: [PATCH] Fix anti dump x64 compatibility --- Confuser.Runtime/AntiDump.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Confuser.Runtime/AntiDump.cs b/Confuser.Runtime/AntiDump.cs index d561779..798707c 100644 --- a/Confuser.Runtime/AntiDump.cs +++ b/Confuser.Runtime/AntiDump.cs @@ -70,7 +70,7 @@ namespace Confuser.Runtime { *(uint*)mdHdr = 0; mdHdr += 12; mdHdr += *(uint*)mdHdr; - mdHdr = (byte*)(((uint)mdHdr + 7) & ~3); + mdHdr = (byte*)(((ulong)mdHdr + 7) & ~3UL); mdHdr += 2; ushort numOfStream = *mdHdr; mdHdr += 2; @@ -198,7 +198,7 @@ namespace Confuser.Runtime { *(uint*)mdHdrPtr = 0; mdHdrPtr += 12; mdHdrPtr += *(uint*)mdHdrPtr; - mdHdrPtr = (byte*)(((uint)mdHdrPtr + 7) & ~3); + mdHdrPtr = (byte*)(((ulong)mdHdrPtr + 7) & ~3UL); mdHdrPtr += 2; ushort numOfStream = *mdHdrPtr; mdHdrPtr += 2;