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 00:27:28 +0000 (17:27 -0700)
Change-Id: I8692b31c6ce64efc68124df02117b6e4529dfe98

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;