mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-21 07:17:45 +01:00
chore: throw when address is negative
This commit is contained in:
parent
264adf6ee7
commit
177f9f9f90
1 changed files with 3 additions and 0 deletions
|
|
@ -68,6 +68,9 @@ namespace Dalamud.Hooking.Internal
|
||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (address.ToInt64() <= 0)
|
||||||
|
throw new InvalidOperationException($"Address was <= 0, this can't be happening?! ({address:X})");
|
||||||
|
|
||||||
var bytes = MemoryHelper.ReadRaw(address, 8);
|
var bytes = MemoryHelper.ReadRaw(address, 8);
|
||||||
|
|
||||||
var codeReader = new ByteArrayCodeReader(bytes);
|
var codeReader = new ByteArrayCodeReader(bytes);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue