mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-18 22:07:44 +01:00
feat: add Pohky SafeMemory
This commit is contained in:
parent
f16d3f82bd
commit
3fe6e45b68
2 changed files with 260 additions and 2 deletions
|
|
@ -31,8 +31,8 @@ namespace Dalamud.Game.Internal
|
|||
this.original = new byte[this.nop.Length];
|
||||
if (DebugCheckAddress != IntPtr.Zero && !IsEnabled) {
|
||||
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);
|
||||
SafeMemory.ReadBytes(DebugCheckAddress, this.nop.Length, out this.original);
|
||||
SafeMemory.WriteBytes(DebugCheckAddress, this.nop);
|
||||
} else {
|
||||
Log.Information("DebugCheck already overwritten?");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue