From 93a12b1dfa8e91459d36916cbdb2425e68643b03 Mon Sep 17 00:00:00 2001 From: Jerome Haltom Date: Fri, 8 Dec 2023 11:40:04 -0600 Subject: [PATCH] Was not passing proper params to mangle. --- src/IKVM.Runtime/JNI/JNIFrame.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/IKVM.Runtime/JNI/JNIFrame.cs b/src/IKVM.Runtime/JNI/JNIFrame.cs index 6a036b7ba4..0a0f9e5efc 100644 --- a/src/IKVM.Runtime/JNI/JNIFrame.cs +++ b/src/IKVM.Runtime/JNI/JNIFrame.cs @@ -119,13 +119,13 @@ public static nint GetFuncPtr(ikvm.@internal.CallerID callerID, string clazz, st { foreach (var p in loader.GetNativeLibraries()) { - if (LibJvm.Instance.JVM_FindLibraryEntry(p, NativeLibrary.MangleExportName(methodName, sp + sizeof(nint) + sizeof(nint))) is nint h1 and not 0) + if (LibJvm.Instance.JVM_FindLibraryEntry(p, NativeLibrary.MangleExportName(methodName, sp)) is nint h1 and not 0) { Tracer.Info(Tracer.Jni, "Native method {0}.{1}{2} found in library 0x{3:X} (short)", clazz, name, sig, p); return h1; } - if (LibJvm.Instance.JVM_FindLibraryEntry(p, NativeLibrary.MangleExportName(longMethodName, sp + sizeof(nint) + sizeof(nint))) is nint h2 and not 0) + if (LibJvm.Instance.JVM_FindLibraryEntry(p, NativeLibrary.MangleExportName(longMethodName, sp)) is nint h2 and not 0) { Tracer.Info(Tracer.Jni, "Native method {0}.{1}{2} found in library 0x{3:X} (long)", clazz, name, sig, p); return h2;