From 591b4ee032f0aa93a5d9c483734e16a8cd1365d1 Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Sun, 17 Jul 2022 22:56:12 +0200 Subject: [PATCH] chore: don't save negative results from SigScanner... --- Dalamud/Game/SigScanner.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dalamud/Game/SigScanner.cs b/Dalamud/Game/SigScanner.cs index 15a0f6116..ffc7188f4 100644 --- a/Dalamud/Game/SigScanner.cs +++ b/Dalamud/Game/SigScanner.cs @@ -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); } }