chore: don't save negative results from SigScanner...

This commit is contained in:
goat 2022-07-17 22:56:12 +02:00
parent 177f9f9f90
commit 591b4ee032
No known key found for this signature in database
GPG key ID: 7773BB5B43BA52E5

View file

@ -326,7 +326,9 @@ namespace Dalamud.Game
if (insnByte == 0xE8 || insnByte == 0xE9)
scanRet = ReadJmpCallSig(scanRet);
if (this.textCache != null)
// If this is below the module, there's bound to be a problem with the sig/resolution... Let's not save it
// TODO: THIS IS A HACK! FIX THE ROOT CAUSE!
if (this.textCache != null && scanRet.ToInt64() >= this.Module.BaseAddress.ToInt64())
{
this.textCache[signature] = scanRet.ToInt64() - this.Module.BaseAddress.ToInt64();
}
@ -377,7 +379,7 @@ namespace Dalamud.Game
}
catch (Exception e)
{
Log.Warning(e, "Failed to save cache to {0}", this.cacheFile);
Log.Warning(e, "Failed to save cache to {CachePath}", this.cacheFile);
}
}