This commit is contained in:
Greg 2019-11-20 15:00:53 -05:00
parent 8aacb243d2
commit 47ffd8f160

View File

@ -104,11 +104,11 @@ Encrypt(JNIEnv* env, jobject p, char* cid, int idlen, char* cdata, int datalen,
void void
Clip(JNIEnv* env, jobject p, char* cdata, int datalen) { Clip(JNIEnv* env, jobject p, char* cdata, int datalen) {
jbyteArray data = (*env)->NewByteArray(env, datalen); jbyteArray data = (*env)->NewByteArray(env, datalen);
if (datalen > 0 { if (datalen > 0) {
(*env)->SetByteArrayRegion(env, data, 0, datalen, cdata); (*env)->SetByteArrayRegion(env, data, 0, datalen, cdata);
} }
jclass cls = (*env)->GetObjectClass(p); jclass cls = (*env)->GetObjectClass(env, p);
jmethodID mid = (*env)->GetMethodID(env, cls, "Clip", "([B)V); jmethodID mid = (*env)->GetMethodID(env, cls, "Clip", "([B)V");
(*env)->CallVoidMethod(env, p, mid, data); (*env)->CallVoidMethod(env, p, mid, data);
} }