cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=fc159fbcaef87b2bcfa5ec33b47ea4ff2875727c

commit fc159fbcaef87b2bcfa5ec33b47ea4ff2875727c
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Mon Aug 4 11:55:05 2014 +0200

    ecore_x: don't go below 0.
    
    It seems that when things go wrong it does happen that we start with i == 
0. It
    will then have been walking into info[-1] 'happily'. Changing the test, to 
first
    decrement and then compare should stop that issue.
    
    This should @fix T1467.
---
 src/lib/ecore_x/xlib/ecore_x_randr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore_x/xlib/ecore_x_randr.c 
b/src/lib/ecore_x/xlib/ecore_x_randr.c
index db1f109..99d630c 100644
--- a/src/lib/ecore_x/xlib/ecore_x_randr.c
+++ b/src/lib/ecore_x/xlib/ecore_x_randr.c
@@ -2458,7 +2458,7 @@ ecore_x_randr_move_crtcs(Ecore_X_Window root, const 
Ecore_X_Randr_Crtc *crtcs, i
         if (i < ncrtc)
           {
              /* something went wrong somewhere. move everything back */
-             while (i-- >= 0)
+             while ((--i) >= 0)
                {
                   if (info[i])
                     ecore_x_randr_crtc_settings_set(root, crtcs[i], NULL, -1, 

-- 


Reply via email to