From 76bf3cd7b8c6189b6b08518cde00c8bd991bdfb7 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 23 Aug 2007 16:22:03 +1000 Subject: randr: fixup crtc and output destroy if you are moving pointers, you want to move the pointers not just a byte --- hw/xfree86/modes/xf86Crtc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 95b3035dc..d375da897 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -128,7 +128,7 @@ xf86CrtcDestroy (xf86CrtcPtr crtc) { memmove (&xf86_config->crtc[c], &xf86_config->crtc[c+1], - xf86_config->num_crtc - (c + 1)); + ((xf86_config->num_crtc - (c + 1)) * sizeof(void*))); xf86_config->num_crtc--; break; } @@ -596,7 +596,7 @@ xf86OutputDestroy (xf86OutputPtr output) { memmove (&xf86_config->output[o], &xf86_config->output[o+1], - xf86_config->num_output - (o + 1)); + ((xf86_config->num_output - (o + 1)) * sizeof(void*))); xf86_config->num_output--; break; } -- cgit v1.2.3