summaryrefslogtreecommitdiff
path: root/src/jvm
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2018-09-04 20:34:03 +0300
committerJari Vetoniemi <mailroxas@gmail.com>2018-09-04 20:50:46 +0300
commitac9d8a241c1f5eda33718b8dd1ccdd2094a1825f (patch)
tree9bec564f245b06bbdad2ad1a7413a18c5e23f696 /src/jvm
parentb76bd91beef9a279cc730ce7167408b2c01953b7 (diff)
hacky input
Diffstat (limited to 'src/jvm')
-rw-r--r--src/jvm/jvm.c6
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;
}