summaryrefslogtreecommitdiff
path: root/nuttx/graphics/nxglib/nxglib_fillrectangle.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/graphics/nxglib/nxglib_fillrectangle.c')
-rw-r--r--nuttx/graphics/nxglib/nxglib_fillrectangle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nuttx/graphics/nxglib/nxglib_fillrectangle.c b/nuttx/graphics/nxglib/nxglib_fillrectangle.c
index 2ed923b95..ee8b6dd01 100644
--- a/nuttx/graphics/nxglib/nxglib_fillrectangle.c
+++ b/nuttx/graphics/nxglib/nxglib_fillrectangle.c
@@ -104,8 +104,8 @@ void NXGL_FUNCNAME(nxgl_fillrectangle,NXGLIB_SUFFIX)
/* Get the dimensions of the rectange to fill in pixels */
- width = rect->pt2.x - rect->pt1.x;
- rows = rect->pt2.y - rect->pt1.y;
+ width = rect->pt2.x - rect->pt1.x + 1;
+ rows = rect->pt2.y - rect->pt1.y + 1;
/* Get the address of the first byte in the first line to write */