summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2007-08-23 16:22:03 +1000
committerDave Airlie <airlied@redhat.com>2007-08-23 16:22:03 +1000
commit76bf3cd7b8c6189b6b08518cde00c8bd991bdfb7 (patch)
tree393e49dc8c718bf2a819d50e72f7ed4c8e6690ed
parent81f8b652d99ee0f7116c1e34aed0e585d23a91fb (diff)
randr: fixup crtc and output destroy
if you are moving pointers, you want to move the pointers not just a byte
-rw-r--r--hw/xfree86/modes/xf86Crtc.c4
1 files 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;
}