Updated PTRGuard to use different values on windows.

This commit is contained in:
cake
2026-01-22 02:16:37 +01:00
parent e00f80d7bd
commit 0808dae4f1
4 changed files with 36 additions and 35 deletions

View File

@@ -127,7 +127,7 @@ public class PlayerDataFactory
{
nint basePtr = playerPointer;
if (!PtrGuard.LooksLikePtr(basePtr))
if (!PtrGuard.LooksLikePtr(basePtr, _dalamudUtil.IsWine))
return true;
nint drawObjAddr = basePtr + _drawObjectOffset;
@@ -135,10 +135,10 @@ public class PlayerDataFactory
if (!PtrGuard.IsReadable(drawObjAddr, (nuint)IntPtr.Size))
return true;
if (!PtrGuard.TryReadIntPtr(drawObjAddr, out var drawObj))
if (!PtrGuard.TryReadIntPtr(drawObjAddr, _dalamudUtil.IsWine, out var drawObj))
return true;
if (drawObj != 0 && !PtrGuard.LooksLikePtr(drawObj))
if (drawObj != 0 && !PtrGuard.LooksLikePtr(drawObj, _dalamudUtil.IsWine))
return true;
return drawObj == 0;