diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 8497c5f07..04917e9c5 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -1885,7 +1885,7 @@ drmmode_load_cursor_argb_check(xf86CrtcPtr crtc, CARD32 *image) ptr[i++] = cpu_to_le32(image[y * ms->max_cursor_width + x]); } /* clear the remainder for good measure */ - for (; i < ms->max_cursor_width * ms->max_cursor_height; i++) + while (i < ms->max_cursor_width * ms->max_cursor_height) ptr[i++] = 0; if (drmmode_crtc->cursor_up)