xrdp: xrdp_painter_copy width, height fix

ulab-original
Jay Sorg 13 years ago
parent e0fc7297f5
commit e8d2e4b6ad

@ -610,13 +610,13 @@ xrdp_painter_copy(struct xrdp_painter* self,
y += dy;
palette_id = 0;
j = srcy;
while (j < src->height)
while (j < (srcy + cy))
{
i = srcx;
while (i < src->width)
while (i < (srcx + cx))
{
w = MIN(64, src->width - i);
h = MIN(64, src->height - j);
w = MIN(64, (srcx + cx) - i);
h = MIN(64, (srcy + cy) - j);
b = xrdp_bitmap_create(w, h, self->wm->screen->bpp, 0, self->wm);
xrdp_bitmap_copy_box_with_crc(src, b, i, j, w, h);
bitmap_id = xrdp_cache_add_bitmap(self->wm->cache, b);

Loading…
Cancel
Save