Skip to content

Commit 253a906

Browse files
author
tuxor1337
committed
Check the right outline flags, fixes #48.
1 parent dd5b6c2 commit 253a906

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

document-viewer/src/main/java/org/ebookdroid/droids/mupdf/codec/MuPdfDocument.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ protected void freeDocument() {
5858
static void normalizeLinkTargetRect(final long docHandle, final int targetPage, final RectF targetRect,
5959
final int flags) {
6060

61-
if ((flags & 0x0F) == 0) {
61+
// Check if flags `fz_link_flag_t_valid` (=1) and `fz_link_flag_l_valid`
62+
// (=2) are set. See mupdf's `include/mupdf/fitz/link.h` for more
63+
// information.
64+
if ((flags & 0x03) == 0) {
6265
targetRect.right = targetRect.left = 0;
6366
targetRect.bottom = targetRect.top = 0;
6467
return;

0 commit comments

Comments
 (0)