pdf: Initialize chapter field of fz_location when resolving links.
authorTor Andersson <[email protected]>
Wed, 26 Jul 2023 12:04:49 +0000 (14:04 +0200)
committerTor Andersson <[email protected]>
Thu, 27 Jul 2023 11:47:36 +0000 (13:47 +0200)
source/pdf/pdf-link.c

index f167d58639a7ac69762f5693e7781fde3c92b455..aceea51f4211eb5e67f8d3730fff307d5e5c39a7 100644 (file)
@@ -919,6 +919,8 @@ pdf_new_explicit_dest_from_uri(fz_context *ctx, pdf_document *doc, const char *u
        zoom = uri ? strstr(uri, "zoom=") : NULL;
        view = uri ? strstr(uri, "view=") : NULL;
 
+       val.loc.chapter = 0;
+
        if (page)
        {
                val.loc.page = fz_atoi(page+5) - 1;