diff options
author | Ken Sharp <ken.sharp@artifex.com> | 2022-06-21 09:29:08 +0100 |
---|---|---|
committer | Ken Sharp <ken.sharp@artifex.com> | 2022-06-21 11:47:52 +0100 |
commit | 481646eb1cdba4f0401cd8f90d8a326ea1e39ae2 (patch) | |
tree | 5cdf35d33d841d611af28a0e1da35e806e28ee59 | |
parent | 6ae825b8a85f93917b07cef1f4b2d6951f4b07cf (diff) | |
download | ghostpdl-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.
-rw-r--r-- | pdf/pdf_mark.c | 3 |
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; |