summaryrefslogtreecommitdiff
path: root/nuttx/graphics/nxglib/nxglib_moverectangle.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/graphics/nxglib/nxglib_moverectangle.c')
-rw-r--r--nuttx/graphics/nxglib/nxglib_moverectangle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nuttx/graphics/nxglib/nxglib_moverectangle.c b/nuttx/graphics/nxglib/nxglib_moverectangle.c
index b9579e3f5..c39c1c560 100644
--- a/nuttx/graphics/nxglib/nxglib_moverectangle.c
+++ b/nuttx/graphics/nxglib/nxglib_moverectangle.c
@@ -147,8 +147,8 @@ void NXGL_FUNCNAME(nxgl_moverectangle,NXGLIB_SUFFIX)
/* Get the dimensions of the rectange to fill: height in rows and width in bytes */
- width = NXGL_SCALEX(rect->pt2.x - rect->pt1.x);
- rows = rect->pt2.y - rect->pt1.y;
+ width = NXGL_SCALEX(rect->pt2.x - rect->pt1.x + 1);
+ rows = rect->pt2.y - rect->pt1.y + 1;
#if NXGLIB_BITSPERPIXEL < 8
# ifdef CONFIG_NXGL_PACKEDMSFIRST