Skip to content

Commit

Permalink
Was not passing proper params to mangle.
Browse files Browse the repository at this point in the history
  • Loading branch information
wasabii committed Dec 8, 2023
1 parent 3434d19 commit 93a12b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/IKVM.Runtime/JNI/JNIFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ public static nint GetFuncPtr([email protected] 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;
Expand Down

0 comments on commit 93a12b1

Please sign in to comment.