diff --git a/android/src/main/jni/DownloadTask.c b/android/src/main/jni/DownloadTask.c index 30fa290..32491f8 100644 --- a/android/src/main/jni/DownloadTask.c +++ b/android/src/main/jni/DownloadTask.c @@ -34,6 +34,10 @@ static int bz2_read(const struct bspatch_stream* stream, void* buffer, int lengt int bz2err; bz_stream* zip; + if (length == 0) { + return 0; + } + zip = (bz_stream*)stream->opaque; zip->next_out = (char*)buffer; zip->avail_out = length;