rowstrides are gsize, not int
authorBenjamin Otte <otte@redhat.com>
Wed, 15 Mar 2023 00:46:19 +0000 (01:46 +0100)
committerBenjamin Otte <otte@redhat.com>
Thu, 16 Mar 2023 20:40:02 +0000 (21:40 +0100)
gdk-pixbuf got that wrong, don't repeat that mistake.

gdk/gdktexture.c
gtk/gdkpixbufutils.c

index 007901ffe847ef1f11c22fadf084510aaa918de5..41cb8ea11a16b24cff76e874816d098c8fa8991a 100644 (file)
@@ -395,7 +395,7 @@ gdk_texture_new_for_pixbuf (GdkPixbuf *pixbuf)
 
   bytes = g_bytes_new_with_free_func (gdk_pixbuf_get_pixels (pixbuf),
                                       gdk_pixbuf_get_height (pixbuf)
-                                      * gdk_pixbuf_get_rowstride (pixbuf),
+                                      * (gsize) gdk_pixbuf_get_rowstride (pixbuf),
                                       g_object_unref,
                                       g_object_ref (pixbuf));
   texture = gdk_memory_texture_new (gdk_pixbuf_get_width (pixbuf),
index 6b29128376d7ea75a26fb422e58d41644c9e64f5..8d049311ac4934091ce3fbab50d28552066414e8 100644 (file)
@@ -284,7 +284,8 @@ extract_plane (GdkPixbuf *src,
                int        to_plane)
 {
   guchar *src_data, *dst_data;
-  int width, height, src_stride, dst_stride;
+  int width, height;
+  gsize src_stride, dst_stride;
   guchar *src_row, *dst_row;
   int x, y;