diff options
Diffstat (limited to 'tests/test-common.c')
-rw-r--r-- | tests/test-common.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test-common.c b/tests/test-common.c index a75655fd5..2f4f3a411 100644 --- a/tests/test-common.c +++ b/tests/test-common.c @@ -194,7 +194,7 @@ pixdata_equal (GdkPixbuf *test, if (memcmp (gdk_pixbuf_get_pixels (test), gdk_pixbuf_get_pixels (ref), gdk_pixbuf_get_byte_length (test)) != 0) { - guint x, y, width, height, n_channels, rowstride; + gint x, y, width, height, n_channels, rowstride; const guchar *test_pixels, *ref_pixels; rowstride = gdk_pixbuf_get_rowstride (test); @@ -204,6 +204,10 @@ pixdata_equal (GdkPixbuf *test, test_pixels = gdk_pixbuf_get_pixels (test); ref_pixels = gdk_pixbuf_get_pixels (ref); + g_assert_cmpint (width, >=, 0); + g_assert_cmpint (height, >=, 0); + g_assert_cmpint (n_channels, >=, 0); + for (y = 0; y < height; y++) { for (x = 0; x < width; x++) |