Skip to content

Commit

Permalink
Merge pull request #75 from beutlich/fix-unload
Browse files Browse the repository at this point in the history
Fix closing library handle on Win
  • Loading branch information
JayHuLBL authored Mar 27, 2024
2 parents af790b3 + aeaecf4 commit 2b9045b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ int main(void) {
#if defined(_WIN32) /* Win32 or Win64 */

libname = "funnel.dll";
HINSTANCE handle = LoadLibrary(libname);
HINSTANCE handle = LoadLibraryA(libname);
if (handle == NULL)
{
fputs("Load failed\n", stderr);
Expand Down Expand Up @@ -110,7 +110,7 @@ int main(void) {
}

#if defined(_WIN32) /* Win32 or Win64 */
CloseHandle(handle);
FreeLibrary(handle);
#else
dlclose(handle);
#endif
Expand Down

0 comments on commit 2b9045b

Please sign in to comment.