Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > e265b08b6bebf8514a189c80db57a2d3 > files > 17

x11-server-1.3.0.0-25.1mdv2008.0.src.rpm

From 4f06c54e75754b0f16cfeb7c5af0eddff81c3908 Mon Sep 17 00:00:00 2001
From: Keith Packard <keithp@koto.keithp.com>
Date: Tue, 7 Aug 2007 12:44:19 -0700
Subject: [PATCH] Decrement mode count when removing RandR output mode.

Removing an output mode without decrementing the mode count scrambles the
output mode array badly.
---
 randr/rroutput.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/randr/rroutput.c b/randr/rroutput.c
index 78182f8..3d984e4 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -249,6 +249,7 @@ RROutputDeleteUserMode (RROutputPtr output,
 
     memmove (output->userModes + m, output->userModes + m + 1,
 	     (output->numUserModes - m - 1) * sizeof (RRModePtr));
+    output->numUserModes--;
     RRModeDestroy (mode);
     return Success;
 }
-- 
1.5.2.4