From 4b3b260783c3743a9e0e0d9a997b71da5dcd8798 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Wed, 8 Aug 2018 00:51:04 +0800 Subject: Coverity found a missing break, add it. The intent with the previous code was to default to black upon unsupported number of components in the color array. The code however first set all components to zero then to the value of the first component of the color array. Now the code follows the original intent. --- source/pdf/pdf-form.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/pdf') diff --git a/source/pdf/pdf-form.c b/source/pdf/pdf-form.c index 5ccdc7fa..8521d63d 100644 --- a/source/pdf/pdf-form.c +++ b/source/pdf/pdf-form.c @@ -983,6 +983,7 @@ void pdf_field_set_text_color(fz_context *ctx, pdf_document *doc, pdf_obj *field { default: color[0] = color[1] = color[2] = 0; + break; case 1: color[0] = color[1] = color[2] = pdf_array_get_real(ctx, col, 0); break; -- cgit v1.2.3