From 4fd80b75255acf3a0a53cb5bf8fcd9ebe87d8eb4 Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Thu, 28 Mar 2024 14:28:04 +0100 Subject: [PATCH] fix gather vtable --- src/QtHelpers/ItemModelGatherVirtualData.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/QtHelpers/ItemModelGatherVirtualData.cpp b/src/QtHelpers/ItemModelGatherVirtualData.cpp index faaf422e..4566a16e 100644 --- a/src/QtHelpers/ItemModelGatherVirtualData.cpp +++ b/src/QtHelpers/ItemModelGatherVirtualData.cpp @@ -172,7 +172,7 @@ void S2Plugin::ItemModelGatherVirtualData::gatherExtraObjects() uint8_t counter = 0; for (const auto& themeName : themes) { - auto themeAddress = Script::Memory::ReadQword(Script::Memory::ReadQword(firstThemeOffset + counter)); + auto themeAddress = Script::Memory::ReadQword(Script::Memory::ReadQword(firstThemeOffset + counter * sizeof(uintptr_t))); auto tableOffset = (themeAddress - vtl.tableStartAddress()) / sizeof(size_t); bool foundInEntries = false; for (auto& entry : mEntries) @@ -227,7 +227,7 @@ void S2Plugin::ItemModelGatherVirtualData::gatherExtraObjects() counter = 0; for (const auto& logicName : logics) { - auto logicAddress = Script::Memory::ReadQword(Script::Memory::ReadQword(firstLogicPtr + counter)); + auto logicAddress = Script::Memory::ReadQword(Script::Memory::ReadQword(firstLogicPtr + counter * sizeof(uintptr_t))); size_t tableOffset = 0; if (logicAddress != 0) {