summaryrefslogtreecommitdiff
path: root/source/pdf
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2018-08-08 00:51:04 +0800
committerSebastian Rasmussen <sebras@gmail.com>2018-08-10 13:54:32 +0800
commit4b3b260783c3743a9e0e0d9a997b71da5dcd8798 (patch)
tree02fbe36993e8a69347da37339381618c6cccfc3a /source/pdf
parent2586767c23a0c2707cddf7138754e1d8c59aa44c (diff)
downloadmupdf-4b3b260783c3743a9e0e0d9a997b71da5dcd8798.tar.xz
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.
Diffstat (limited to 'source/pdf')
-rw-r--r--source/pdf/pdf-form.c1
1 files changed, 1 insertions, 0 deletions
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;