Skip to content

Commit

Permalink
fix gather vtable
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Auto committed Mar 28, 2024
1 parent f230f31 commit 4fd80b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/QtHelpers/ItemModelGatherVirtualData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit 4fd80b7

Please sign in to comment.