Repository: incubator-guacamole-server Updated Branches: refs/heads/master 3f2cdb197 -> ea6b094e2
GUACAMOLE-185: Fix copy/transfer rectangle calculation. Clip source to bounds, NOT to clipping rectangle. Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/a72531b6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/a72531b6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/a72531b6 Branch: refs/heads/master Commit: a72531b65cea9465597e245f2e061013eba61797 Parents: 2de7d01 Author: Michael Jumper <[email protected]> Authored: Fri Oct 14 15:22:16 2016 -0700 Committer: Michael Jumper <[email protected]> Committed: Wed Jan 25 21:05:08 2017 -0800 ---------------------------------------------------------------------- src/common/surface.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/a72531b6/src/common/surface.c ---------------------------------------------------------------------- diff --git a/src/common/surface.c b/src/common/surface.c index cf5185e..f4e2f1d 100644 --- a/src/common/surface.c +++ b/src/common/surface.c @@ -1250,8 +1250,8 @@ void guac_common_surface_copy(guac_common_surface* src, int sx, int sy, guac_common_rect srect; guac_common_rect_init(&srect, sx, sy, w, h); - /* Clip operation source rect */ - __guac_common_clip_rect(src, &srect, &dx, &dy); + /* Clip operation source rect to bounds */ + __guac_common_bound_rect(src, &srect, &dx, &dy); if (srect.width <= 0 || srect.height <= 0) goto complete; @@ -1291,7 +1291,7 @@ void guac_common_surface_copy(guac_common_surface* src, int sx, int sy, /* Update backing surface last if drect can intersect srect */ if (src == dst) - __guac_common_surface_transfer(src, &sx, &sy, + __guac_common_surface_transfer(src, &srect.x, &srect.y, GUAC_TRANSFER_BINARY_SRC, dst, &drect); complete: @@ -1318,8 +1318,8 @@ void guac_common_surface_transfer(guac_common_surface* src, int sx, int sy, int guac_common_rect srect; guac_common_rect_init(&srect, sx, sy, w, h); - /* Clip operation source rect */ - __guac_common_clip_rect(src, &srect, &dx, &dy); + /* Clip operation source rect to bounds */ + __guac_common_bound_rect(src, &srect, &dx, &dy); if (srect.width <= 0 || srect.height <= 0) goto complete;
