discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=457a385fa753886836151d3a5ca8452937746ffc

commit 457a385fa753886836151d3a5ca8452937746ffc
Author: Mike Blumenkrantz <zm...@samsung.com>
Date:   Thu Mar 13 12:50:18 2014 -0400

    clamp screen sizes to 1 to avoid impossible division-by-zero for window 
shots
    
    CID 1040148
---
 src/modules/shot/e_mod_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c
index d6a3b6a..9a6abd3 100644
--- a/src/modules/shot/e_mod_main.c
+++ b/src/modules/shot/e_mod_main.c
@@ -647,8 +647,8 @@ _shot_now(E_Zone *zone, E_Client *ec, const char *params)
         h = sh;
         x = E_CLAMP(x, ec->zone->x, ec->zone->x + ec->zone->w);
         y = E_CLAMP(y, ec->zone->y, ec->zone->y + ec->zone->h);
-        sw = E_CLAMP(sw, 0, ec->zone->x + ec->zone->w - x);
-        sh = E_CLAMP(sh, 0, ec->zone->y + ec->zone->h - y);
+        sw = E_CLAMP(sw, 1, ec->zone->x + ec->zone->w - x);
+        sh = E_CLAMP(sh, 1, ec->zone->y + ec->zone->h - y);
         visual = e_pixmap_visual_get(ec->pixmap);
         depth = ec->depth;
      }

-- 


Reply via email to