diff --git a/Source/Process/Process.cpp b/Source/Process/Process.cpp index ed704f9d..13cd2f0d 100644 --- a/Source/Process/Process.cpp +++ b/Source/Process/Process.cpp @@ -239,14 +239,14 @@ namespace Aurora::Process auto handle = LoadLibraryW(Locale::ConvertFromUTF8(path).c_str()); if (handle == INVALID_HANDLE_VALUE) { - SysPushErrorNested("Could't link dynamic library {}", handle); + SysPushErrorNested("Could't link dynamic library {}", path); return {}; } #else - auto handle = dlopen(path, RTLD_DEEPBIND); - if (handle != INVALID_HANDLE_VALUE) + auto handle = dlopen(path.c_str(), RTLD_DEEPBIND); + if (handle == nullptr) { - SysPushErrorNested("Could't link dynamic library {}", handle); + SysPushErrorNested("Could't link dynamic library {}", path); return {}; } #endif