From 2d5e991cb1efe42d9c594e3a91e8907741d15301 Mon Sep 17 00:00:00 2001 From: "BST 1998 Adam D. Moss" Date: Sun, 27 Sep 1998 12:59:44 +0000 Subject: [PATCH] Fixed a bug in color_only_pixels(), fixed a possible bug in Sun Sep 27 13:53:03 BST 1998 Adam D. Moss * app/paint_funcs.c: Fixed a bug in color_only_pixels(), fixed a possible bug in border_region(). --- ChangeLog | 5 +++++ app/paint-funcs/paint-funcs.c | 7 ++++--- app/paint_funcs.c | 7 ++++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index e68cf04ef8..c43d32023c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Sep 27 13:53:03 BST 1998 Adam D. Moss + + * app/paint_funcs.c: Fixed a bug in color_only_pixels(), + fixed a possible bug in border_region(). + Sat Sep 26 20:46:18 BST 1998 Adam D. Moss * app/channel.c app/channel_ops.c app/drawable.c diff --git a/app/paint-funcs/paint-funcs.c b/app/paint-funcs/paint-funcs.c index 5db703389c..d65a6fb7e0 100644 --- a/app/paint-funcs/paint-funcs.c +++ b/app/paint-funcs/paint-funcs.c @@ -377,6 +377,7 @@ color_pixels (unsigned char *dest, register unsigned char c0, c1, c2; register guint32 *longd, longc; register guint16 *shortd, shortc; + switch (bytes) { case 1: @@ -662,7 +663,7 @@ color_only_pixels (const unsigned char *src1, b1 = b2; /* set the destination */ - hls_to_rgb (&r1, &g1, &bytes1); + hls_to_rgb (&r1, &g1, &b1); dest[0] = r1; dest[1] = g1; dest[2] = b1; @@ -4040,11 +4041,11 @@ border_region(PixelRegion *src, gint16 radius) } if (radius == 0) { - char color[] = "\0\0\0"; + char color[] = "\0\0\0\0"; color_region(src, color); return; } - if (radius == 1) /* optomize this case specificaly */ + if (radius == 1) /* optimize this case specifically */ { guchar *transition; guchar *source[3]; diff --git a/app/paint_funcs.c b/app/paint_funcs.c index 5db703389c..d65a6fb7e0 100644 --- a/app/paint_funcs.c +++ b/app/paint_funcs.c @@ -377,6 +377,7 @@ color_pixels (unsigned char *dest, register unsigned char c0, c1, c2; register guint32 *longd, longc; register guint16 *shortd, shortc; + switch (bytes) { case 1: @@ -662,7 +663,7 @@ color_only_pixels (const unsigned char *src1, b1 = b2; /* set the destination */ - hls_to_rgb (&r1, &g1, &bytes1); + hls_to_rgb (&r1, &g1, &b1); dest[0] = r1; dest[1] = g1; dest[2] = b1; @@ -4040,11 +4041,11 @@ border_region(PixelRegion *src, gint16 radius) } if (radius == 0) { - char color[] = "\0\0\0"; + char color[] = "\0\0\0\0"; color_region(src, color); return; } - if (radius == 1) /* optomize this case specificaly */ + if (radius == 1) /* optimize this case specifically */ { guchar *transition; guchar *source[3];