struts: Avoid an integer underflow

Fixes #900
This commit is contained in:
Uli Schlachter 2016-05-14 17:34:06 -04:00 committed by Emmanuel Lepage Vallee
parent 25f4f24791
commit 992b03d8d2
1 changed files with 2 additions and 2 deletions

View File

@ -756,8 +756,8 @@ void screen_update_workarea(screen_t *screen)
area.x += left;
area.y += top;
area.width -= left + right;
area.height -= top + bottom;
area.width -= MIN(area.width, left + right);
area.height -= MIN(area.height, top + bottom);
if (AREA_EQUAL(area, screen->workarea))
return;