summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Holgate <matt@emobix.co.uk>2014-06-23 14:54:08 +0100
committerMatt Holgate <matt@emobix.co.uk>2014-06-23 14:54:08 +0100
commit6b39f7991bf1330fc75a7dd869bc46a7f8f10078 (patch)
tree2e0ee9ca6253c1a68b6a08178dfab6f035e98ab9
parent5e8cbb16509767f42072739b7f13391051191f89 (diff)
downloadmupdf-6b39f7991bf1330fc75a7dd869bc46a7f8f10078.tar.xz
Fix for bug #695229 - open document from byte array doesn't work, but saving to file and open from file works
Patch was supplied by gong_su@hotmail.com. Thanks!
-rw-r--r--platform/android/jni/mupdf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/android/jni/mupdf.c b/platform/android/jni/mupdf.c
index c7965702..01a8db9b 100644
--- a/platform/android/jni/mupdf.c
+++ b/platform/android/jni/mupdf.c
@@ -363,6 +363,7 @@ static int bufferStreamNext(fz_stream *stream, int max)
stream->rp = bs->buffer;
stream->wp = stream->rp + len;
+ stream->pos += len;
if (len == 0)
return EOF;
return *stream->rp++;
@@ -432,6 +433,7 @@ JNI_FN(MuPDFCore_openBuffer)(JNIEnv * env, jobject thiz)
return 0;
}
+ fz_register_document_handlers(ctx);
fz_var(stream);
glo->doc = NULL;