From 6df016fb205bec2c07872597ad126856b341cff7 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sat, 18 May 2013 16:05:58 +0200 Subject: [PATCH] Fix JNI for C instead of C++ (because apparently there is a significant difference...) --- src/java/org_bitcoin_NativeSecp256k1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/org_bitcoin_NativeSecp256k1.c b/src/java/org_bitcoin_NativeSecp256k1.c index a1683df4b6c..ed65cccf615 100644 --- a/src/java/org_bitcoin_NativeSecp256k1.c +++ b/src/java/org_bitcoin_NativeSecp256k1.c @@ -4,7 +4,7 @@ JNIEXPORT jint JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdsa_1verify (JNIEnv* env, jclass classObject, jobject byteBufferObject) { - unsigned char* data = (unsigned char*) env->GetDirectBufferAddress(byteBufferObject); + unsigned char* data = (unsigned char*) (*env)->GetDirectBufferAddress(env, byteBufferObject); int sigLen = *((int*)(data + 32)); int pubLen = *((int*)(data + 32 + 4));