summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2014-08-04 11:55:05 +0200
committerCedric BAIL <cedric@osg.samsung.com>2014-08-04 11:56:50 +0200
commitfc159fbcaef87b2bcfa5ec33b47ea4ff2875727c (patch)
treed9ceb910ec84d6b4cb830c9575e0ab8e6e64890b
parent97dc9cac367aeeddf94a31131994e8c188534702 (diff)
downloadefl-fc159fbcaef87b2bcfa5ec33b47ea4ff2875727c.tar.gz
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.
-rw-r--r--src/lib/ecore_x/xlib/ecore_x_randr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ecore_x/xlib/ecore_x_randr.c b/src/lib/ecore_x/xlib/ecore_x_randr.c
index db1f10968c..99d630c02c 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,