fixing mingw errors
VoidLoader/VoidLoaderCore/pipeline/head There was a failure building this commit

Signed-off-by: Faumaray <faumaray@gmail.com>
This commit is contained in:
faumaray committed 2025-10-21 00:19:00 +03:00
1 parent fff614c871
commit 4ee04b3e7b
1 file changed
+4 -4
+4 -4
View File
@@ -4,7 +4,7 @@
#include <assert.h>
#include <cstdint>
#include <windows.h>
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
static int32_t __wtf8_decode1(const char** input) {
uint32_t code_point;
uint8_t b1;
@@ -98,17 +98,17 @@ void* LoadLibrary(const std::string& path, bool isGlobal)
return nullptr;
if ((size_t) r > ARRAY_SIZE(filename_w))
return nullptr;
_wtf8_to_utf16(path.c_str(), filename_w, r);
wtf8_to_utf16(path.c_str(), filename_w, r);
return LoadLibraryExW(filename_w, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
}
bool CloseLibrary(void* handle)
{
return FreeLibrary(handle) != 0;
return FreeLibrary(static_cast<HMODULE>(handle)) != 0;
}
void* LoadSymbol(void* handle, const std::string& name)
{
return (void*)(uintptr_t) GetProcAddress(handle, name.c_str());
return (void*)(uintptr_t) GetProcAddress(static_cast<HMODULE>(handle), name.c_str());
}
#endif