From: Michael Zucchi Date: Tue, 16 Jul 2019 09:52:44 +0000 (+0930) Subject: Fix, use library-path rather than library name for LoadLibrary X-Git-Url: https://code.zedzone.au/cvs?a=commitdiff_plain;h=4c210bc69e3a0b886ae715f8db9c00f24d4bba9f;p=nativez Fix, use library-path rather than library name for LoadLibrary --- diff --git a/src/notzed.nativez/jni/nativez-windows.c b/src/notzed.nativez/jni/nativez-windows.c index ff616e9..1602c98 100644 --- a/src/notzed.nativez/jni/nativez-windows.c +++ b/src/notzed.nativez/jni/nativez-windows.c @@ -46,9 +46,10 @@ static int fail(const char *ctx, const char *what) { int nativez_ResolveLibraries(JNIEnv *env, NZLibTable *table) { for (int i=0;table[i].name;i++) { - table[i].lib = LoadLibrary(table[i].name); - if (!table[i].lib && (table[i].flags & NZSO_NONCORE) == 0) - return fail("open library", table[i].name); + table[i].lib = LoadLibrary(table[i].path); + if (!table[i].lib && (table[i].flags & NZSO_NONCORE) == 0) { + return fail("open library", table[i].path); + } } return 0; }