Fix safe_func

This commit is contained in:
fed 2023-01-29 21:49:18 +01:00
parent eb69cd9a03
commit c294aba7ae

View File

@ -87,8 +87,7 @@ namespace gsc
void safe_func() void safe_func()
{ {
static utils::hook::detour hook; static utils::hook::detour hook;
static const auto stub = []()
const auto stub = []()
{ {
__try __try
{ {
@ -101,7 +100,7 @@ namespace gsc
}; };
const auto ptr = rva + 0_b; const auto ptr = rva + 0_b;
hook.create(ptr, stub); hook.create(reinterpret_cast<void*>(ptr), stub);
} }
} }