summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test-common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test-common.c b/tests/test-common.c
index a4ea4fa3b..cda99883a 100644
--- a/tests/test-common.c
+++ b/tests/test-common.c
@@ -156,15 +156,15 @@ pixdata_equal (GdkPixbuf *test,
{
g_set_error (error, GDK_PIXBUF_ERROR, 0, "Image data at %ux%u is #%02X%02X%02X%02X, but should be #%02X%02X%02X%02X",
x, y,
- test_pixels[0], test_pixels[1], test_pixels[2], test_pixels[3],
- ref_pixels[0], ref_pixels[1], ref_pixels[2], ref_pixels[3]);
+ test_pixels[x * n_channels + 0], test_pixels[x * n_channels + 1], test_pixels[x * n_channels + 2], test_pixels[x * n_channels + 3],
+ ref_pixels[x * n_channels + 0], ref_pixels[x * n_channels + 1], ref_pixels[x * n_channels + 2], ref_pixels[x * n_channels + 3]);
}
else if (n_channels == 3)
{
g_set_error (error, GDK_PIXBUF_ERROR, 0, "Image data at %ux%u is #%02X%02X%02X, but should be #%02X%02X%02X",
x, y,
- test_pixels[0], test_pixels[1], test_pixels[2],
- ref_pixels[0], ref_pixels[1], ref_pixels[2]);
+ test_pixels[x * n_channels + 0], test_pixels[x * n_channels + 1], test_pixels[x * n_channels + 2],
+ ref_pixels[x * n_channels + 0], ref_pixels[x * n_channels + 1], ref_pixels[x * n_channels + 2]);
}
else
{