diff options
author | Dave Airlie <airlied@redhat.com> | 2007-08-23 16:22:03 +1000 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-08-23 12:22:56 -0700 |
commit | d34b66402c9205aae38316c5855f3b492a7612c2 (patch) | |
tree | 0f5626681ad8b02f8ddc5c01e8ecdd5214ac8ad6 /hw | |
parent | efac9c9c2e7cfa974fb0e7737832f0e34d156f65 (diff) |
randr: fixup crtc and output destroy
if you are moving pointers, you want to move the pointers not just a byte
(cherry picked from commit 76bf3cd7b8c6189b6b08518cde00c8bd991bdfb7)
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/modes/xf86Crtc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 08306bcd7..5a6fc3a12 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; } |