1
0
mirror of synced 2024-09-24 11:38:26 +02:00

fix: Build on Windows

This commit is contained in:
WerWolv 2023-11-10 22:21:19 +01:00
parent ec4942174b
commit 388523a4ea

View File

@ -43,7 +43,7 @@ namespace hex::script::loader {
T getExport(void *h, const char *name) {
try {
FARPROC f = ::GetProcAddress(static_cast<HMODULE>(h), name);
return *reinterpret_cast<T*>(&f);
return reinterpret_cast<T>(reinterpret_cast<uintptr_t>(f));
} catch (...) {
return nullptr;
}