1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-03 17:59:33 +02:00

better error handling in inflate()

This commit is contained in:
Nikolay Pultsin 2011-04-11 22:40:35 +01:00
parent ed7179afa6
commit 2bd25967e7

View file

@ -51,7 +51,7 @@ jlong Java_org_amse_ys_zip_DeflatingDecompressor_inflate(JNIEnv *env, jobject th
} }
} }
if (stream == 0) { if (stream == 0) {
return 0; return -1;
} }
jbyte* inStart = env->GetByteArrayElements(in, 0); jbyte* inStart = env->GetByteArrayElements(in, 0);
@ -71,5 +71,5 @@ jlong Java_org_amse_ys_zip_DeflatingDecompressor_inflate(JNIEnv *env, jobject th
} }
return result; return result;
} }
return 0; return -2;
} }