From 48b3b263fe034d7e34f61abada9864c4a6c7c8d8 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Mon, 19 May 2003 15:54:52 +0000 Subject: [PATCH] fixed sense of assertions; argh. 2003-05-19 Sven Neumann * app/base/temp-buf.c (temp_buf_to_color) (temp_buf_to_gray): fixed sense of assertions; argh. --- ChangeLog | 5 +++++ app/base/temp-buf.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index d9ff332cf9..c7a65c103e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-05-19 Sven Neumann + + * app/base/temp-buf.c (temp_buf_to_color) (temp_buf_to_gray): + fixed sense of assertions; argh. + 2003-05-19 Michael Natterer * libgimpcolor/gimpcolorspace.c (gimp_hsl_to_rgb): fixed to work diff --git a/app/base/temp-buf.c b/app/base/temp-buf.c index 7e9e25fbe2..16739af06a 100644 --- a/app/base/temp-buf.c +++ b/app/base/temp-buf.c @@ -85,7 +85,7 @@ temp_buf_to_color (TempBuf *src_buf, switch (dest_buf->bytes) { case 3: - g_return_if_fail (src_buf->bytes != 1); + g_return_if_fail (src_buf->bytes == 1); while (num_pixels--) { guchar tmpch; @@ -96,7 +96,7 @@ temp_buf_to_color (TempBuf *src_buf, break; case 4: - g_return_if_fail (src_buf->bytes != 2); + g_return_if_fail (src_buf->bytes == 2); while (num_pixels--) { guchar tmpch; @@ -131,7 +131,7 @@ temp_buf_to_gray (TempBuf *src_buf, switch (dest_buf->bytes) { case 1: - g_return_if_fail (src_buf->bytes != 3); + g_return_if_fail (src_buf->bytes == 3); while (num_pixels--) { pix = INTENSITY (src[0], src[1], src[2]); @@ -142,7 +142,7 @@ temp_buf_to_gray (TempBuf *src_buf, break; case 2: - g_return_if_fail (src_buf->bytes != 4); + g_return_if_fail (src_buf->bytes == 4); while (num_pixels--) { pix = INTENSITY (src[0], src[1], src[2]);