From 7739ffb38a1e33eb16f33fb396ef178844a6907e Mon Sep 17 00:00:00 2001 From: BST 1999 Andy Thomas Date: Thu, 8 Apr 1999 20:27:00 +0000 Subject: [PATCH] Changed:- Thu Apr 8 21:19:05 BST 1999 Andy Thomas Changed:- * app/image_map.c Fixed boundary problem in new function image_map_get_color_at(). --- ChangeLog | 8 ++++++++ app/core/gimpimagemap.c | 6 ++++-- app/image_map.c | 6 ++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index feee0dfc11..d934b9bee0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Thu Apr 8 21:19:05 BST 1999 Andy Thomas + + Changed:- + + * app/image_map.c + + Fixed boundary problem in new function image_map_get_color_at(). + Thu Apr 8 07:12:10 MEST 1999 Sven Neumann * app/crop.[ch]: Ok, this is a little bit more than what we diff --git a/app/core/gimpimagemap.c b/app/core/gimpimagemap.c index 8ea57c34f7..7c68bf745d 100644 --- a/app/core/gimpimagemap.c +++ b/app/core/gimpimagemap.c @@ -320,8 +320,10 @@ image_map_get_color_at (ImageMap image_map, int x, int y) if (!image_map || (!gimp_drawable_gimage(_image_map->drawable) && - gimp_drawable_indexed(_image_map->drawable)) - || x < 0 || y < 0 ) + gimp_drawable_indexed(_image_map->drawable)) || + x < 0 || y < 0 || + x >= _image_map->undo_tiles->width || + y >= _image_map->undo_tiles->height) { return NULL; } diff --git a/app/image_map.c b/app/image_map.c index 8ea57c34f7..7c68bf745d 100644 --- a/app/image_map.c +++ b/app/image_map.c @@ -320,8 +320,10 @@ image_map_get_color_at (ImageMap image_map, int x, int y) if (!image_map || (!gimp_drawable_gimage(_image_map->drawable) && - gimp_drawable_indexed(_image_map->drawable)) - || x < 0 || y < 0 ) + gimp_drawable_indexed(_image_map->drawable)) || + x < 0 || y < 0 || + x >= _image_map->undo_tiles->width || + y >= _image_map->undo_tiles->height) { return NULL; }