Skip to content

Commit

Permalink
Merge pull request #26 from tinarm/nhe-bad-signature
Browse files Browse the repository at this point in the history
Change signature for NativeHookException access from short to int.  Thanks to tinarm for the patch.
  • Loading branch information
kwhat committed Dec 4, 2014
2 parents 806515d + 50c967d commit 1e814d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/jni/jni_Errors.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void jni_ThrowNativeHookException(JNIEnv *env, short code, const char *message)
env,
Exception_class,
"<init>",
"(SLjava/lang/String;)V");
"(ILjava/lang/String;)V");

if (init != NULL) {
jobject Exception_object = (*env)->NewObject(
Expand All @@ -72,10 +72,10 @@ void jni_ThrowNativeHookException(JNIEnv *env, short code, const char *message)
(*env)->DeleteLocalRef(env, Exception_object);
}
else {
jni_Logger(env, LOG_LEVEL_ERROR, "%s [%u]: Failed to acquire the method ID for NativeHookException.<init>(SLjava/lang/String;)V!\n",
jni_Logger(env, LOG_LEVEL_ERROR, "%s [%u]: Failed to acquire the method ID for NativeHookException.<init>(ILjava/lang/String;)V!\n",
__FUNCTION__, __LINE__);

jni_ThrowException(env, "java/lang/NoClassDefFoundError", "org/jnativehook/NativeHookException.<init>(SLjava/lang/String;)V");
jni_ThrowException(env, "java/lang/NoClassDefFoundError", "org/jnativehook/NativeHookException.<init>(ILjava/lang/String;)V");
}
}
else {
Expand Down

1 comment on commit 1e814d4

@tinarm
Copy link

@tinarm tinarm commented on 1e814d4 Dec 5, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to thank you for a great lib, and for your tremendous high activity and quick feedback. It helps me a lot. :)

Please sign in to comment.