Fix copying damage region with wrong size

Fortunately this hasn't caused problems...

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-01-08 21:34:56 +00:00
parent 72e3468694
commit dd02ea31ae
No known key found for this signature in database
GPG Key ID: D3A4405BE6CC17F4
1 changed files with 1 additions and 1 deletions

View File

@ -892,7 +892,7 @@ glx_paint_pre(session_t *ps, region_t *preg) {
// XXX use a circular queue instead of memmove
pixman_region32_fini(&ps->all_damage_last[CGLX_MAX_BUFFER_AGE - 1]);
memmove(ps->all_damage_last + 1, ps->all_damage_last,
(CGLX_MAX_BUFFER_AGE - 1) * sizeof(region_t *));
(CGLX_MAX_BUFFER_AGE - 1) * sizeof(region_t));
ps->all_damage_last[0] = newdamage;
}