diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-05-21 20:44:45 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-05-21 20:45:50 +0100 |
commit | 7ca8145238935fb5d704dd72c078fd946885a7e5 (patch) | |
tree | 31ba348ce1285e465dce90726ad641ca4d593e93 /android/jni/mupdf.c | |
parent | db9f1dadbc7c302bc6c1947760b95715dd1652e3 (diff) | |
download | mupdf-7ca8145238935fb5d704dd72c078fd946885a7e5.tar.xz |
Android: Fix crash when selecting text.
We were failing to setup and maintain the span number correctly.
Diffstat (limited to 'android/jni/mupdf.c')
-rw-r--r-- | android/jni/mupdf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/android/jni/mupdf.c b/android/jni/mupdf.c index f45e17ba..86e932cd 100644 --- a/android/jni/mupdf.c +++ b/android/jni/mupdf.c @@ -1271,7 +1271,7 @@ JNI_FN(MuPDFCore_text)(JNIEnv * env, jobject thiz) sarr = (*env)->NewObjectArray(env, len, textSpanClass, NULL); if (sarr == NULL) fz_throw(ctx, "NewObjectArray failed"); - for (span = line->first_span; span; span = span->next) + for (s=0, span = line->first_span; span; s++, span = span->next) { jobjectArray *carr = (*env)->NewObjectArray(env, span->len, textCharClass, NULL); if (carr == NULL) fz_throw(ctx, "NewObjectArray failed"); |