From 6a4f5d72134f492492952185dddd3aa140a0f53c Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 12 Jul 2016 15:02:34 +0100 Subject: Android JNI Annotation fix. We pass pointers from the JNI layer into the java to be stored as java longs. When doing this it is VITAL that we cast them correctly as otherwise the JNI layer on android has problems - presumably because of alignment in the procedure calling standard. I'd missed this in one place. Fixed here. --- platform/java/mupdf_native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'platform/java') diff --git a/platform/java/mupdf_native.c b/platform/java/mupdf_native.c index 66e63879..f34881f1 100644 --- a/platform/java/mupdf_native.c +++ b/platform/java/mupdf_native.c @@ -654,7 +654,7 @@ static inline jobject to_Annotation(fz_context *ctx, JNIEnv *env, fz_annot *anno if (ctx == NULL || annot == NULL) return NULL; - jannot = (*env)->NewObject(env, cls_Annot, mid_Annot_init, annot); + jannot = (*env)->NewObject(env, cls_Annot, mid_Annot_init, jlong_cast(annot)); if (jannot == NULL) fz_throw_java(ctx, env); -- cgit v1.2.3