OSDN Git Service

Fix a cast in JniEnv::NewDirectByteBuffer.
authorElliott Hughes <enh@google.com>
Sat, 30 Mar 2013 00:27:28 +0000 (17:27 -0700)
committerElliott Hughes <enh@google.com>
Sat, 30 Mar 2013 01:03:12 +0000 (18:03 -0700)
(cherry picked from commit 1abc689a32fc20b38227060e4da5e0934df8fc19)

Change-Id: I89c8544d77721aaa5ae192087e8873d3d64d5f3b

vm/Jni.cpp

index f235835..e571ad8 100644 (file)
@@ -2739,7 +2739,7 @@ static jobject NewDirectByteBuffer(JNIEnv* env, void* address, jlong capacity) {
     jobject result = addLocalReference(ts.self(), newObj);
     JValue unused;
     dvmCallMethod(ts.self(), gDvm.methJavaNioDirectByteBuffer_init,
-            newObj, &unused, (jint) address, (jint) capacity);
+            newObj, &unused, (jlong) address, (jint) capacity);
     if (dvmGetException(ts.self()) != NULL) {
         deleteLocalReference(ts.self(), result);
         return NULL;