summaryrefslogtreecommitdiff
path: root/pdf/pdf_mark.c
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2022-06-21 09:29:08 +0100
committerKen Sharp <ken.sharp@artifex.com>2022-06-21 11:47:52 +0100
commit481646eb1cdba4f0401cd8f90d8a326ea1e39ae2 (patch)
tree5cdf35d33d841d611af28a0e1da35e806e28ee59 /pdf/pdf_mark.c
parent6ae825b8a85f93917b07cef1f4b2d6951f4b07cf (diff)
downloadghostpdl-481646eb1cdba4f0401cd8f90d8a326ea1e39ae2.tar.gz
GhostPDF - Fix Outline processing
The loop finding a named destination from the Names tree wasn't exiting on success, leading to an incorrect (not found) error return instead. Simply breaking out of the loop on success solves the problem.
Diffstat (limited to 'pdf/pdf_mark.c')
-rw-r--r--pdf/pdf_mark.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pdf/pdf_mark.c b/pdf/pdf_mark.c
index 72f12ca45..98e3dc627 100644
--- a/pdf/pdf_mark.c
+++ b/pdf/pdf_mark.c
@@ -744,6 +744,9 @@ static int pdfi_get_name_from_node(pdf_context *ctx, pdf_dict *node, char *str,
code = pdfi_get_name_from_node(ctx, Kid, str, Name);
pdfi_countdown(Kid);
Kid = NULL;
+ if (code == 0)
+ break;
+
if (code < 0) {
if (code == gs_error_undefined)
continue;