Someone missed to add extra conditions when changing from
unsigned to signed.
/Simon Griph
Index: libs/PictureImageLoader.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/libs/PictureImageLoader.c,v
retrieving revision 1.33
diff -u -r1.33 PictureImageLoader.c
--- libs/PictureImageLoader.c 16 Jul 2007 15:07:14 -0000 1.33
+++ libs/PictureImageLoader.c 19 Jul 2007 00:37:56 -0000
@@ -879,7 +879,8 @@
fpa.mask = FPAM_NO_ALPHA | FPAM_MONOCHROME;
/* Adjust the hot-spot if necessary */
- if (x_hot >= width || y_hot >= height)
+ if (x_hot < 0 || x_hot >= width ||
+ y_hot < 0 || y_hot >= height)
{
FxpmImage xpm_im;
FxpmInfo xpm_info;
@@ -897,11 +898,11 @@
FxpmFreeXpmImage(&xpm_im);
FxpmFreeXpmInfo(&xpm_info);
}
- if (x_hot >= width)
+ if (x_hot < 0 || x_hot >= width)
{
x_hot = width / 2;
}
- if (y_hot >= height)
+ if (y_hot < 0 || y_hot >= height)
{
y_hot = height / 2;
}