summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2022-08-16 13:12:23 +0100
committerKen Sharp <ken.sharp@artifex.com>2022-08-16 13:12:23 +0100
commit203fc04f3079ef07a61c3f90bcc124d0568c4887 (patch)
tree644a214e903930a6b2c5a4da9f892b51d8f9d620
parentbf1c4732795d489f34144a42a8a9d0d39b706402 (diff)
downloadghostpdl-203fc04f3079ef07a61c3f90bcc124d0568c4887.tar.gz
GhostPDF - Correct Widget annotation key name
The comment around line 3662, copied from the original PostScript implementation, refers to the FT (Field Type) key, but the code was actually trying to find a key named /TF, whcih didn't exist because there is no such key defined. Fix the spelling, and change all the variable names to match.
-rw-r--r--pdf/pdf_annot.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/pdf/pdf_annot.c b/pdf/pdf_annot.c
index 58210d8a6..63667d517 100644
--- a/pdf/pdf_annot.c
+++ b/pdf/pdf_annot.c
@@ -3633,9 +3633,9 @@ static int pdfi_annot_draw_Widget(pdf_context *ctx, pdf_dict *annot, pdf_obj *No
{
int code = 0;
bool found_T = false;
- bool found_TF = false;
+ bool found_FT = false;
pdf_obj *T = NULL;
- pdf_obj *TF = NULL;
+ pdf_obj *FT = NULL;
pdf_dict *Parent = NULL;
pdf_dict *currdict = NULL;
@@ -3663,10 +3663,10 @@ static int pdfi_annot_draw_Widget(pdf_context *ctx, pdf_dict *annot, pdf_obj *No
found_T = true;
break;
}
- code = pdfi_dict_knownget(ctx, currdict, "TF", &TF);
+ code = pdfi_dict_knownget(ctx, currdict, "FT", &FT);
if (code < 0) goto exit;
if (code > 0) {
- found_TF = true;
+ found_FT = true;
break;
}
/* Check for Parent */
@@ -3680,7 +3680,7 @@ static int pdfi_annot_draw_Widget(pdf_context *ctx, pdf_dict *annot, pdf_obj *No
}
code = 0;
- if (!found_T && !found_TF) {
+ if (!found_T && !found_FT) {
*render_done = true;
dmprintf(ctx->memory, "**** Warning: A Widget annotation dictionary lacks either the FT or T key.\n");
dmprintf(ctx->memory, " Acrobat ignores such annoataions, annotation will not be rendered.\n");
@@ -3700,7 +3700,7 @@ static int pdfi_annot_draw_Widget(pdf_context *ctx, pdf_dict *annot, pdf_obj *No
exit:
pdfi_countdown(T);
- pdfi_countdown(TF);
+ pdfi_countdown(FT);
pdfi_countdown(Parent);
pdfi_countdown(currdict);
return code;