Package: fig2dev / 1:3.2.7a-5+deb10u1

35_neg_colornum.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: Thomas Loimer <thomas.loimer@tuwien.ac.at>
Date: Sun, 26 Aug 2018 13:49:46 +0200
Bug: https://sourceforge.net/p/mcj/tickets/30
Origin: https://sourceforge.net/p/mcj/fig2dev/ci/c31306
Subject: Change negative color number to default, ticket #30

--- a/fig2dev/read.c
+++ b/fig2dev/read.c
@@ -495,6 +495,12 @@ static void
 fix_and_note_color(int *color)
 {
     int		    i;
+    if (*color < DEFAULT) {
+	put_msg("Invalid color number %d at line %d, using default color.",
+			*color, line_no);
+	*color = DEFAULT;
+	return;
+    }
     if (*color < NUM_STD_COLS) {
 	if (*color >= BLACK_COLOR) {
 	    std_color_used[*color] = true;