summaryrefslogtreecommitdiff
path: root/src/lib/ecore_x
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-11 21:17:39 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-11 21:17:39 +0900
commit1e6375cbe35e788300b8089f7c5ebada67746afc (patch)
tree4e490c08c0360e817ced5e7c3c230fe6af00277b /src/lib/ecore_x
parentaa11fef2189b321dd09ee2c699c427a1103a1406 (diff)
ecore x xrandr - fix possible divide by zero
fixes CID 1039437 , 1039438
Diffstat (limited to 'src/lib/ecore_x')
-rw-r--r--src/lib/ecore_x/xlib/ecore_x_randr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ecore_x/xlib/ecore_x_randr.c b/src/lib/ecore_x/xlib/ecore_x_randr.c
index 3277045a43..03da85020c 100644
--- a/src/lib/ecore_x/xlib/ecore_x_randr.c
+++ b/src/lib/ecore_x/xlib/ecore_x_randr.c
@@ -655,14 +655,14 @@ ecore_x_randr_screen_current_size_set(Ecore_X_Window root, int w, int h, int w_m
655 if (h <= 0) h = ch; 655 if (h <= 0) h = ch;
656 if (w_mm <= 0) 656 if (w_mm <= 0)
657 { 657 {
658 if ((double)cw > 0.0) 658 if (cw > 0)
659 w_mm = (int)(((double)(cwmm / (double)cw)) * (double)w); 659 w_mm = (int)(((double)(cwmm / (double)cw)) * (double)w);
660 else 660 else
661 w_mm = (int)(((double)(cwmm)) * (double)w); 661 w_mm = (int)(((double)(cwmm)) * (double)w);
662 } 662 }
663 if (h_mm <= 0) 663 if (h_mm <= 0)
664 { 664 {
665 if ((double)ch > 0.0) 665 if (ch > 0)
666 h_mm = (int)(((double)(chmm / (double)ch)) * (double)h); 666 h_mm = (int)(((double)(chmm / (double)ch)) * (double)h);
667 else 667 else
668 h_mm = (int)(((double)(chmm)) * (double)h); 668 h_mm = (int)(((double)(chmm)) * (double)h);