diff --git a/lib/libimhex/source/helpers/utils.cpp b/lib/libimhex/source/helpers/utils.cpp index 167aad31e..b56db3f79 100644 --- a/lib/libimhex/source/helpers/utils.cpp +++ b/lib/libimhex/source/helpers/utils.cpp @@ -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); diff --git a/plugins/script_loader/source/loaders/dotnet/dotnet_loader.cpp b/plugins/script_loader/source/loaders/dotnet/dotnet_loader.cpp index 117da86b7..0fcd35d11 100644 --- a/plugins/script_loader/source/loaders/dotnet/dotnet_loader.cpp +++ b/plugins/script_loader/source/loaders/dotnet/dotnet_loader.cpp @@ -77,8 +77,7 @@ namespace hex::script::loader { if (library == "cimgui") { return getExport(ImHexApi::System::getLibImHexModuleHandle(), symbolName); } else if (library == "ImHex") { - auto address = getExport(hex::getContainingModule((void*)&pInvokeOverride), symbolName); - return address; + return getExport(hex::getContainingModule((void*)&pInvokeOverride), symbolName); } return nullptr;