diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2012-05-13 14:09:52 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2012-05-13 14:09:52 -0700 |
commit | e8d2e4b6ad7538fc8f87bbe285d7d2a2413a734e (patch) | |
tree | 7973a543cd6e69560eec23462401209e175f9432 /xrdp/xrdp_painter.c | |
parent | e0fc7297f5bd0c4297e6b6b8ca2d7cd80251b1c9 (diff) | |
download | xrdp-proprietary-e8d2e4b6ad7538fc8f87bbe285d7d2a2413a734e.tar.gz xrdp-proprietary-e8d2e4b6ad7538fc8f87bbe285d7d2a2413a734e.zip |
xrdp: xrdp_painter_copy width, height fix
Diffstat (limited to 'xrdp/xrdp_painter.c')
-rw-r--r-- | xrdp/xrdp_painter.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xrdp/xrdp_painter.c b/xrdp/xrdp_painter.c index 132b338e..38644ae1 100644 --- a/xrdp/xrdp_painter.c +++ b/xrdp/xrdp_painter.c @@ -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); |