summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2022-03-09 10:22:05 +0000
committerChris Liddell <chris.liddell@artifex.com>2022-03-09 11:40:01 +0000
commite7c272a8b28dbbd30bd0d3c6bf078adc72f04897 (patch)
tree82602566a0b26918401b2f9f31971e5a2938d457
parentd09b29a0cc0402b4a328fa1c08b232235280fb1f (diff)
downloadghostpdl-e7c272a8b28dbbd30bd0d3c6bf078adc72f04897.tar.gz
Fix 'pget' for pdfi with Ghostscript
The utility program pdf2dsc.ps expects that both pget and knownoget will be available in the current dictionary after runpdfbegin is executed. To facilitate this pdfi makes such a definition but, unfortunately, it had a bug if the key was not found in the dictionary, leaving a copy of the dictionary on the operand stack when it should not. Fixed here. Thanks to William Bader for spotting the bug.
-rw-r--r--Resource/Init/pdf_main.ps2
1 files changed, 1 insertions, 1 deletions
diff --git a/Resource/Init/pdf_main.ps b/Resource/Init/pdf_main.ps
index a82451d93..895b001f7 100644
--- a/Resource/Init/pdf_main.ps
+++ b/Resource/Init/pdf_main.ps
@@ -1008,7 +1008,7 @@ systemdict /NEWPDF known not {/NEWPDF //true def} if
% These are also for the benefit of pdf2dsc, which assumes they
% are available.
/knownoget {2 copy known {get //true}{pop //false}ifelse} bind def
- /pget {2 copy known {get //true}{pop //false}ifelse}bind def
+ /pget {2 copy known {get //true}{pop pop //false}ifelse}bind def
newpdf_gather_parameters
{.PDFInit} stopped