From ac9d8a241c1f5eda33718b8dd1ccdd2094a1825f Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Tue, 4 Sep 2018 20:34:03 +0300 Subject: hacky input --- src/jvm/jvm.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/jvm') 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; } -- cgit v1.2.3-70-g09d2