diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-09-04 20:34:03 +0300 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-09-04 20:50:46 +0300 |
commit | ac9d8a241c1f5eda33718b8dd1ccdd2094a1825f (patch) | |
tree | 9bec564f245b06bbdad2ad1a7413a18c5e23f696 /src/jvm | |
parent | b76bd91beef9a279cc730ce7167408b2c01953b7 (diff) |
hacky input
Diffstat (limited to 'src/jvm')
-rw-r--r-- | src/jvm/jvm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/jvm/jvm.c b/src/jvm/jvm.c index f54aad5..bbba360 100644 --- a/src/jvm/jvm.c +++ b/src/jvm/jvm.c @@ -541,9 +541,15 @@ static jboolean JNIEnv_IsInstanceOf(JNIEnv* p0, jobject p1, jclass p2) { assert(p0 && p1 && p2); + // FIXME: we don't have inheritance verbose("%u, %u", (uint32_t)(uintptr_t)p1, (uint32_t)(uintptr_t)p2); verbose("%s", jvm_get_object(jnienv_get_jvm(p0), jvm_get_object(jnienv_get_jvm(p0), p1)->this_klass)->klass.name.data); verbose("%s", jvm_get_object(jnienv_get_jvm(p0), p2)->klass.name.data); + + if (strstr(jvm_get_object(jnienv_get_jvm(p0), jvm_get_object(jnienv_get_jvm(p0), p1)->this_klass)->klass.name.data, "MotionEvent") || + strstr(jvm_get_object(jnienv_get_jvm(p0), p2)->klass.name.data, "MotionEvent")) + return true; + return jvm_get_object(jnienv_get_jvm(p0), p1)->this_klass == p2; } |