Skip to content

Commit

Permalink
type conversion fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
altalk23 committed Jan 19, 2025
1 parent 6733f0a commit 6346f7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/generator/Generator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ namespace tulip::hook {

struct RelocateReturn {
std::vector<uint8_t> m_relocatedBytes;
int64_t m_originalOffset;
size_t m_originalOffset;
};

struct TrampolineReturn {
FunctionData m_trampoline;
int64_t m_originalOffset;
size_t m_originalOffset;
};

virtual geode::Result<TrampolineReturn> generateTrampoline(uint64_t target);
Expand Down
2 changes: 1 addition & 1 deletion src/generator/X86Generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ geode::Result<X86HandlerGenerator::RelocateReturn> X86HandlerGenerator::relocate
auto bufferOffset = trampolineAddress - baseAddress;
return geode::Ok(RelocateReturn{
.m_relocatedBytes = std::vector<uint8_t>(buffer.begin(), buffer.begin() + bufferOffset),
.m_originalOffset = static_cast<int64_t>(originalAddress - reinterpret_cast<uint64_t>(m_address)),
.m_originalOffset = static_cast<size_t>(originalAddress - reinterpret_cast<uint64_t>(m_address)),
});
}

Expand Down

0 comments on commit 6346f7b

Please sign in to comment.