fix: Build on Windows
This commit is contained in:
parent
ec4942174b
commit
388523a4ea
@ -43,7 +43,7 @@ namespace hex::script::loader {
|
|||||||
T getExport(void *h, const char *name) {
|
T getExport(void *h, const char *name) {
|
||||||
try {
|
try {
|
||||||
FARPROC f = ::GetProcAddress(static_cast<HMODULE>(h), name);
|
FARPROC f = ::GetProcAddress(static_cast<HMODULE>(h), name);
|
||||||
return *reinterpret_cast<T*>(&f);
|
return reinterpret_cast<T>(reinterpret_cast<uintptr_t>(f));
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user