fix: Unix build issues with dladdr
This commit is contained in:
parent
fdf01dfb50
commit
3798654f92
@ -795,8 +795,8 @@ namespace hex {
|
||||
|
||||
return nullptr;
|
||||
#elif !defined(OS_WEB)
|
||||
Dl_info info;
|
||||
if (dladdr(symbol, nullptr) == 0)
|
||||
Dl_info info = {};
|
||||
if (dladdr(symbol, &info) == 0)
|
||||
return nullptr;
|
||||
|
||||
return dlopen(info.dli_fname, RTLD_LAZY);
|
||||
|
@ -77,8 +77,7 @@ namespace hex::script::loader {
|
||||
if (library == "cimgui") {
|
||||
return getExport<void*>(ImHexApi::System::getLibImHexModuleHandle(), symbolName);
|
||||
} else if (library == "ImHex") {
|
||||
auto address = getExport<void*>(hex::getContainingModule((void*)&pInvokeOverride), symbolName);
|
||||
return address;
|
||||
return getExport<void*>(hex::getContainingModule((void*)&pInvokeOverride), symbolName);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user