aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2015-07-08 13:34:53 +1000
committerinmarket <andrewh@inmarket.com.au>2015-07-08 13:34:53 +1000
commit9d62e631cf143d4ed50d66fc157a24370cd5489a (patch)
tree19c99f8f2621673f4d3ef66433c40fdf0f65c625 /src
parent0d54fae73192c23af3657fea756c91ea84008804 (diff)
downloaduGFX-9d62e631cf143d4ed50d66fc157a24370cd5489a.tar.gz
uGFX-9d62e631cf143d4ed50d66fc157a24370cd5489a.tar.bz2
uGFX-9d62e631cf143d4ed50d66fc157a24370cd5489a.zip
Allow a zero sized clipping region
Diffstat (limited to 'src')
-rw-r--r--src/gdisp/gdisp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gdisp/gdisp.c b/src/gdisp/gdisp.c
index 86931952..377ccddb 100644
--- a/src/gdisp/gdisp.c
+++ b/src/gdisp/gdisp.c
@@ -1259,7 +1259,7 @@ void gdispGBlitArea(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, c
{
if (x < 0) { cx += x; x = 0; }
if (y < 0) { cy += y; y = 0; }
- if (cx <= 0 || cy <= 0 || x >= g->g.Width || y >= g->g.Height) { MUTEX_EXIT(g); return; }
+ if (cx <= 0 || cy <= 0 || x >= g->g.Width || y >= g->g.Height) { x = y = cx = cy = 0; }
g->clipx0 = x;
g->clipy0 = y;
g->clipx1 = x+cx; if (g->clipx1 > g->g.Width) g->clipx1 = g->g.Width;