From 732adf9063615d7fae6ac30daedf0854198d3edc Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 20 Feb 2015 16:44:56 -0800 Subject: [PATCH] GUAC-1090: Clip operation by surface size when no clipping rectangle is present. --- src/common/guac_surface.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/guac_surface.c b/src/common/guac_surface.c index 33290108..fab593c8 100644 --- a/src/common/guac_surface.c +++ b/src/common/guac_surface.c @@ -122,9 +122,11 @@ static void __guac_common_clip_rect(guac_common_surface* surface, int orig_x = rect->x; int orig_y = rect->y; - /* Skip clipping if no clipping rectangle applied */ - if (!surface->clipped) + /* Just bound within surface if no clipping rectangle applied */ + if (!surface->clipped) { + __guac_common_bound_rect(surface, rect, sx, sy); return; + } guac_common_rect_constrain(rect, &surface->clip_rect);