]> Pileus Git - ~andy/gtk/commitdiff
gdk_image_get_pixel, gdk_image_put_pixel: Fixed sense of bounds checks.
authorBill Haneman <billh@src.gnome.org>
Mon, 7 Oct 2002 15:16:06 +0000 (15:16 +0000)
committerBill Haneman <billh@src.gnome.org>
Mon, 7 Oct 2002 15:16:06 +0000 (15:16 +0000)
ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/linux-fb/gdkimage-fb.c
gdk/win32/gdkimage-win32.c
gdk/x11/gdkdrawable-x11.c
gdk/x11/gdkimage-x11.c

index 1d1c91de8f7f5c93dfbe20c04bfebaa98f8033c3..9f19f3156d563562323d92f3d6c0114b126c44db 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Oct 7 16:07:52 2002  Bill Haneman <bill.haneman@sun.com>
+
+       * gdk/x11/gdkimage-x11.c gdk/linux-fb/gdkimage-x11.c 
+       gdk/win32/gdkimage-x11.c: (gdk_image_get_pixel): 
+       (gdk_image_put_pixel): Fixed sense of bounds checks.
+
 Sun Oct  6 21:23:29 2002  Manish Singh  <yosh@gimp.org>
 
        * gtk/gtkcontainer.[ch] gtk/gtkbox.[ch] gtk/gtkhbox.[ch]
index 1d1c91de8f7f5c93dfbe20c04bfebaa98f8033c3..9f19f3156d563562323d92f3d6c0114b126c44db 100644 (file)
@@ -1,3 +1,9 @@
+Mon Oct 7 16:07:52 2002  Bill Haneman <bill.haneman@sun.com>
+
+       * gdk/x11/gdkimage-x11.c gdk/linux-fb/gdkimage-x11.c 
+       gdk/win32/gdkimage-x11.c: (gdk_image_get_pixel): 
+       (gdk_image_put_pixel): Fixed sense of bounds checks.
+
 Sun Oct  6 21:23:29 2002  Manish Singh  <yosh@gimp.org>
 
        * gtk/gtkcontainer.[ch] gtk/gtkbox.[ch] gtk/gtkhbox.[ch]
index 1d1c91de8f7f5c93dfbe20c04bfebaa98f8033c3..9f19f3156d563562323d92f3d6c0114b126c44db 100644 (file)
@@ -1,3 +1,9 @@
+Mon Oct 7 16:07:52 2002  Bill Haneman <bill.haneman@sun.com>
+
+       * gdk/x11/gdkimage-x11.c gdk/linux-fb/gdkimage-x11.c 
+       gdk/win32/gdkimage-x11.c: (gdk_image_get_pixel): 
+       (gdk_image_put_pixel): Fixed sense of bounds checks.
+
 Sun Oct  6 21:23:29 2002  Manish Singh  <yosh@gimp.org>
 
        * gtk/gtkcontainer.[ch] gtk/gtkbox.[ch] gtk/gtkhbox.[ch]
index 1d1c91de8f7f5c93dfbe20c04bfebaa98f8033c3..9f19f3156d563562323d92f3d6c0114b126c44db 100644 (file)
@@ -1,3 +1,9 @@
+Mon Oct 7 16:07:52 2002  Bill Haneman <bill.haneman@sun.com>
+
+       * gdk/x11/gdkimage-x11.c gdk/linux-fb/gdkimage-x11.c 
+       gdk/win32/gdkimage-x11.c: (gdk_image_get_pixel): 
+       (gdk_image_put_pixel): Fixed sense of bounds checks.
+
 Sun Oct  6 21:23:29 2002  Manish Singh  <yosh@gimp.org>
 
        * gtk/gtkcontainer.[ch] gtk/gtkbox.[ch] gtk/gtkhbox.[ch]
index 1d1c91de8f7f5c93dfbe20c04bfebaa98f8033c3..9f19f3156d563562323d92f3d6c0114b126c44db 100644 (file)
@@ -1,3 +1,9 @@
+Mon Oct 7 16:07:52 2002  Bill Haneman <bill.haneman@sun.com>
+
+       * gdk/x11/gdkimage-x11.c gdk/linux-fb/gdkimage-x11.c 
+       gdk/win32/gdkimage-x11.c: (gdk_image_get_pixel): 
+       (gdk_image_put_pixel): Fixed sense of bounds checks.
+
 Sun Oct  6 21:23:29 2002  Manish Singh  <yosh@gimp.org>
 
        * gtk/gtkcontainer.[ch] gtk/gtkbox.[ch] gtk/gtkhbox.[ch]
index 1d1c91de8f7f5c93dfbe20c04bfebaa98f8033c3..9f19f3156d563562323d92f3d6c0114b126c44db 100644 (file)
@@ -1,3 +1,9 @@
+Mon Oct 7 16:07:52 2002  Bill Haneman <bill.haneman@sun.com>
+
+       * gdk/x11/gdkimage-x11.c gdk/linux-fb/gdkimage-x11.c 
+       gdk/win32/gdkimage-x11.c: (gdk_image_get_pixel): 
+       (gdk_image_put_pixel): Fixed sense of bounds checks.
+
 Sun Oct  6 21:23:29 2002  Manish Singh  <yosh@gimp.org>
 
        * gtk/gtkcontainer.[ch] gtk/gtkbox.[ch] gtk/gtkhbox.[ch]
index a624b9df480815be2a8e42e094aa97bb924c9665..265be6231901197b40a799af490fcb0765c613bd 100644 (file)
@@ -264,8 +264,8 @@ gdk_image_get_pixel (GdkImage *image,
   GdkImagePrivateFB *private;
 
   g_return_val_if_fail (image != NULL, 0);
-  g_return_val_if_fail (x < 0 || x >= image->width, 0);
-  g_return_val_if_fail (y < 0 || y >= image->height, 0);
+  g_return_val_if_fail (x >= 0 && x < image->width, 0);
+  g_return_val_if_fail (y >= 0 && y < image->height, 0);
 
   private = GDK_IMAGE_PRIVATE_DATA (image);
 
@@ -298,8 +298,8 @@ gdk_image_put_pixel (GdkImage *image,
   guchar *ptr = image->mem;
 
   g_return_if_fail (image != NULL);
-  g_return_if_fail (x < 0 || x >= image->width);
-  g_return_if_fail (y < 0 || y >= image->height);
+  g_return_if_fail (x >= 0 && x < image->width);
+  g_return_if_fail (y >= 0 && y < image->height);
 
   switch (image->depth)
     {
index 99a35d3c1619ef0b45abb0ad523c95c82f30f600..9f4f6784fb0766b959a97a9f9fccbd18084b81e6 100644 (file)
@@ -265,8 +265,8 @@ gdk_image_get_pixel (GdkImage *image,
   guchar *pixelp;
 
   g_return_val_if_fail (image != NULL, 0);
-  g_return_val_if_fail (x < 0 || x >= image->width, 0);
-  g_return_val_if_fail (y < 0 || y >= image->height, 0);
+  g_return_val_if_fail (x >= 0 && x < image->width, 0);
+  g_return_val_if_fail (y >= 0 && y < image->height, 0);
 
   if (!(x >= 0 && x < image->width && y >= 0 && y < image->height))
       return 0;
@@ -313,8 +313,8 @@ gdk_image_put_pixel (GdkImage *image,
   guchar *pixelp;
 
   g_return_if_fail (image != NULL);
-  g_return_if_fail (x < 0 || x >= image->width);
-  g_return_if_fail (y < 0 || y >= image->height);
+  g_return_if_fail (x >= 0 && x < image->width);
+  g_return_if_fail (y >= 0 && y < image->height);
 
   if  (!(x >= 0 && x < image->width && y >= 0 && y < image->height))
     return;
index ed07cace1ad550a25ab6669c26d1aaa4bcdae25f..6b0a78115db2499e31a482efe685381082916406 100644 (file)
@@ -1255,7 +1255,7 @@ draw_with_images (GdkDrawable       *drawable,
                                 GDK_PIXMAP_XID (pix),
                                 mask_format, 0, NULL);
 
-  dest_pict = gdk_x11_drawable_get_picture (drawable);
+  dest_pict = gdk_x11_drawable_get_picture (drawable);  
   
   pix_gc = gdk_gc_new (pix);
 
index 52fbad19b48916db7e61ceecfff0450ea8c019f7..6db83450205d920f9aa3fa0a7f3f744b2571a63e 100644 (file)
@@ -697,8 +697,8 @@ gdk_image_get_pixel (GdkImage *image,
   GdkImagePrivateX11 *private;
 
   g_return_val_if_fail (GDK_IS_IMAGE (image), 0);
-  g_return_val_if_fail (x < 0 || x >= image->width, 0);
-  g_return_val_if_fail (y < 0 || y >= image->height, 0);
+  g_return_val_if_fail (x >= 0 && x < image->width, 0);
+  g_return_val_if_fail (y >= 0 && y < image->height, 0);
 
   private = PRIVATE_DATA (image);
 
@@ -719,8 +719,8 @@ gdk_image_put_pixel (GdkImage *image,
   GdkImagePrivateX11 *private;
 
   g_return_if_fail (GDK_IS_IMAGE (image));
-  g_return_if_fail (x < 0 || x >= image->width);
-  g_return_if_fail (y < 0 || y >= image->height);
+  g_return_if_fail (x >= 0 && x < image->width);
+  g_return_if_fail (y >= 0 && y < image->height);
 
   private = PRIVATE_DATA (image);