diff --git a/CommonLibF4/include/REL/Relocation.h b/CommonLibF4/include/REL/Relocation.h index 2a3bf789..65aa44ce 100644 --- a/CommonLibF4/include/REL/Relocation.h +++ b/CommonLibF4/include/REL/Relocation.h @@ -300,28 +300,32 @@ namespace REL safe_write(address(), a_data.data(), a_data.size_bytes()); } - template - std::uintptr_t write_branch(const std::uintptr_t a_dst) requires(std::same_as) + template + std::uintptr_t write_branch(const std::uintptr_t a_dst) + requires(std::same_as) { - return F4SE::GetTrampoline().write_branch(address(), a_dst); + return F4SE::GetTrampoline().write_branch(address() + O, a_dst); } - template - std::uintptr_t write_branch(const F a_dst) requires(std::same_as) + template + std::uintptr_t write_branch(const F a_dst) + requires(std::same_as) { - return F4SE::GetTrampoline().write_branch(address(), stl::unrestricted_cast(a_dst)); + return F4SE::GetTrampoline().write_branch(address() + O, stl::unrestricted_cast(a_dst)); } - template - std::uintptr_t write_call(const std::uintptr_t a_dst) requires(std::same_as) + template + std::uintptr_t write_call(const std::uintptr_t a_dst) + requires(std::same_as) { - return F4SE::GetTrampoline().write_call(address(), a_dst); + return F4SE::GetTrampoline().write_call(address() + O , a_dst); } - template - std::uintptr_t write_call(const F a_dst) requires(std::same_as) + template + std::uintptr_t write_call(const F a_dst) + requires(std::same_as) { - return F4SE::GetTrampoline().write_call(address(), stl::unrestricted_cast(a_dst)); + return F4SE::GetTrampoline().write_call(address() + O, stl::unrestricted_cast(a_dst)); } void write_fill(const std::uint8_t a_value, const std::size_t a_count) requires(std::same_as)