Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
RenardDev authored Aug 7, 2024
1 parent b9d044c commit 88bb9f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Detours.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7724,15 +7724,15 @@ namespace Detours {
const size_t unOffset = reinterpret_cast<size_t>(pAddress) - unBase;
SetRegisterValue(pCTX, WriteOperand.Info.Memory.Base, WriteOperand.Info.Memory.BaseSize, reinterpret_cast<size_t>(pNewAddress) - unOffset);
WriteOperand.Info.Memory.HasIndex = false;
g_CachedOperations.emplace_back(const_cast<void*>(pExceptionAddress), unOperation, const_cast<void*>(pAddress), OperandCopy, static_cast<char*>(pNewAddress) - unOffset);
g_CachedOperations.emplace_back(const_cast<void*>(pExceptionAddress), unOperation, const_cast<void*>(pAddress), WriteOperand, static_cast<char*>(pNewAddress) - unOffset);
return;
}

if (unIndex) {
const size_t unOffset = reinterpret_cast<size_t>(pAddress) - unIndex;
SetRegisterValue(pCTX, WriteOperand.Info.Memory.Index, WriteOperand.Info.Memory.IndexSize, reinterpret_cast<size_t>(pNewAddress) - unOffset);
WriteOperand.Info.Memory.HasBase = false;
g_CachedOperations.emplace_back(const_cast<void*>(pExceptionAddress), unOperation, const_cast<void*>(pAddress), OperandCopy, static_cast<char*>(pNewAddress) - unOffset);
g_CachedOperations.emplace_back(const_cast<void*>(pExceptionAddress), unOperation, const_cast<void*>(pAddress), WriteOperand, static_cast<char*>(pNewAddress) - unOffset);
return;
}
}
Expand Down

0 comments on commit 88bb9f3

Please sign in to comment.