mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
dticon: make sure min_x and min_y are within icon to avoid a
segfault.
This commit is contained in:
parent
16eb6092b0
commit
6a0990615d
1 changed files with 6 additions and 0 deletions
|
@ -837,6 +837,12 @@ Transfer_Back_Image(
|
||||||
max_x = ((x1 > x2) ? x1 : x2);
|
max_x = ((x1 > x2) ? x1 : x2);
|
||||||
max_y = ((y1 > y2) ? y1 : y2);
|
max_y = ((y1 > y2) ? y1 : y2);
|
||||||
|
|
||||||
|
/*** make sure min_x and min_y are within icon ***/
|
||||||
|
if (min_x < 0)
|
||||||
|
min_x = 0;
|
||||||
|
if (min_y < 0)
|
||||||
|
min_y = 0;
|
||||||
|
|
||||||
/*** make sure max_x and max_y are within icon ***/
|
/*** make sure max_x and max_y are within icon ***/
|
||||||
if (max_x >= icon_width)
|
if (max_x >= icon_width)
|
||||||
max_x = icon_width-1;
|
max_x = icon_width-1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue