mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: wrong variable for ptr in antidebug, oops
This commit is contained in:
parent
6d54f44ed0
commit
3a0636b776
1 changed files with 2 additions and 3 deletions
|
|
@ -17,21 +17,20 @@ namespace Dalamud.Game.Internal
|
|||
Log.Verbose("IsDebuggerPresent address {IsDebuggerPresent}", DebugCheckAddress);
|
||||
}
|
||||
|
||||
private IntPtr scanAddress;
|
||||
private readonly byte[] nop = new byte[] { 0x31, 0xC0, 0x90, 0x90, 0x90, 0x90 };
|
||||
private byte[] original;
|
||||
|
||||
public void Enable() {
|
||||
this.original = new byte[this.nop.Length];
|
||||
if (DebugCheckAddress != IntPtr.Zero) {
|
||||
Log.Information($"Overwriting Debug Check @ 0x{scanAddress.ToInt64():X}");
|
||||
Log.Information($"Overwriting Debug Check @ 0x{DebugCheckAddress.ToInt64():X}");
|
||||
Marshal.Copy(DebugCheckAddress, this.original, 0, this.nop.Length);
|
||||
Marshal.Copy(this.nop, 0, DebugCheckAddress, this.nop.Length);
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
if (this.scanAddress != IntPtr.Zero && this.original != null)
|
||||
if (this.DebugCheckAddress != IntPtr.Zero && this.original != null)
|
||||
Marshal.Copy(this.original, 0, DebugCheckAddress, this.nop.Length);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue