Ryan-rsm-McKenzie / CommonLibSSE

A reverse engineered library for hacking Skyrim Special Edition

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

write_call and write_branch jumps to the wrong address if called multiple times

Vermunds opened this issue · comments

The first time these functions are called, they work as expected, but calling them multiple times results in jumping to/calling the address specified in the first one.

Example:

SKSE::Trampoline& trampoline = SKSE::GetTrampoline();
trampoline.write_call<5>(someID.address(), Foo);
trampoline.write_call<5>(someID.address() + 0x5, Bar);

This should result in a call to Foo and an another one to Bar, but both calls Foo instead.

should be fixed