diff options
author | Ken Sharp <ken.sharp@artifex.com> | 2023-02-04 14:57:25 +0000 |
---|---|---|
committer | Ken Sharp <ken.sharp@artifex.com> | 2023-02-04 19:26:02 +0000 |
commit | 8e8dbd978281f88a12000f1abfee85639e6d45ea (patch) | |
tree | 6b2cf676da4ddb9edf8f7710289cfe30c66b1986 /pdf | |
parent | 3820c64854530c46b8cb3db17f539baa1d3ee8cb (diff) | |
download | ghostpdl-8e8dbd978281f88a12000f1abfee85639e6d45ea.tar.gz |
GhostPDF - Fix compiler warnings
Not sure why these cropped up as new, but fix anyway.
Diffstat (limited to 'pdf')
-rw-r--r-- | pdf/pdf_annot.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pdf/pdf_annot.c b/pdf/pdf_annot.c index f4455200e..41e37332e 100644 --- a/pdf/pdf_annot.c +++ b/pdf/pdf_annot.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2019-2022 Artifex Software, Inc. +/* Copyright (C) 2019-2023 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -3137,6 +3137,7 @@ static int pdfi_annot_draw_PolyLine(pdf_context *ctx, pdf_dict *annot, pdf_obj * int i = 0; int state = 0; + memset(ends, 0x00, 8 * sizeof(double)); code = pdfi_dict_get_type(ctx, annot, "Path", PDF_ARRAY, (pdf_obj **)&Path); if (code < 0) goto exit; @@ -3227,13 +3228,17 @@ static int pdfi_annot_draw_PolyLine(pdf_context *ctx, pdf_dict *annot, pdf_obj * if (code < 0) break; } + if (code < 0) + goto exit; + code = gs_stroke(ctx->pgs); if (code < 0) goto exit; code = pdfi_annot_draw_LE(ctx, annot, ends[0], ends[1], ends[2], ends[3], 1); + if (code < 0) + goto exit; code = pdfi_annot_draw_LE(ctx, annot, ends[4], ends[5], ends[6], ends[7], 2); - if (code < 0) goto exit; } exit: |