From 992b03d8d2f1cc8f85ada81bcaeface2eb0b7109 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 14 May 2016 17:34:06 -0400 Subject: [PATCH] struts: Avoid an integer underflow Fixes #900 --- objects/screen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/objects/screen.c b/objects/screen.c index 9081be8c3..42207cf73 100644 --- a/objects/screen.c +++ b/objects/screen.c @@ -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;