mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dtappbuilder: Fix unsigned integer rollover.
This commit is contained in:
parent
44cba6f3d1
commit
997d11a702
1 changed files with 4 additions and 4 deletions
|
@ -537,7 +537,7 @@ abobj_resize(
|
|||
if (trans_x < 0)
|
||||
{
|
||||
resize_rect.x = 0;
|
||||
resize_rect.width += trans_x;
|
||||
resize_rect.width = max(0, resize_rect.width + trans_x);
|
||||
|
||||
if (obj_is_pane(obj) || obj_is_separator(obj)) /* If a pane, attach to parent's edge */
|
||||
obj_set_attachment(xy_obj, AB_CP_WEST, AB_ATTACH_OBJ, obj_get_parent(xy_obj), 0);
|
||||
|
@ -556,7 +556,7 @@ abobj_resize(
|
|||
if (trans_y < 0)
|
||||
{
|
||||
resize_rect.y = 0;
|
||||
resize_rect.height += trans_y;
|
||||
resize_rect.height = max(0, resize_rect.height + trans_y);
|
||||
|
||||
if (obj_is_pane(obj) || obj_is_separator(obj)) /* If a pane, attach to parent's edge */
|
||||
obj_set_attachment(xy_obj, AB_CP_NORTH, AB_ATTACH_OBJ, obj_get_parent(xy_obj), 0);
|
||||
|
@ -574,7 +574,7 @@ abobj_resize(
|
|||
|
||||
if (resize_rect.x + (short)resize_rect.width >= (short)p_rect.width)
|
||||
{
|
||||
resize_rect.width = (short)p_rect.width - resize_rect.x - 1;
|
||||
resize_rect.width = max(0, (short)p_rect.width - resize_rect.x - 1);
|
||||
|
||||
if (obj_is_pane(obj) || obj_is_separator(obj)) /* If a pane, attach to parent's edge */
|
||||
obj_set_attachment(xy_obj, AB_CP_EAST, AB_ATTACH_OBJ, obj_get_parent(xy_obj), 0);
|
||||
|
@ -590,7 +590,7 @@ abobj_resize(
|
|||
|
||||
if (resize_rect.y + (short)resize_rect.height > (short)p_rect.height)
|
||||
{
|
||||
resize_rect.height = (short)p_rect.height - resize_rect.y - 1;
|
||||
resize_rect.height = max(0, (short)p_rect.height - resize_rect.y - 1);
|
||||
|
||||
if (obj_is_pane(obj) || obj_is_separator(obj)) /* If a pane, attach to parent's edge */
|
||||
obj_set_attachment(xy_obj, AB_CP_SOUTH, AB_ATTACH_OBJ, obj_get_parent(xy_obj), 0);
|
||||
|
|
Loading…
Reference in a new issue