diff options
Diffstat (limited to 'nuttx/graphics/nxglib/nxglib_copyrectangle.c')
-rw-r--r-- | nuttx/graphics/nxglib/nxglib_copyrectangle.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nuttx/graphics/nxglib/nxglib_copyrectangle.c b/nuttx/graphics/nxglib/nxglib_copyrectangle.c index 1feb0c7a9..8a13260c6 100644 --- a/nuttx/graphics/nxglib/nxglib_copyrectangle.c +++ b/nuttx/graphics/nxglib/nxglib_copyrectangle.c @@ -104,8 +104,8 @@ void NXGL_FUNCNAME(nxgl_copyrectangle,NXGLIB_SUFFIX) /* Get the dimensions of the rectange to fill: height in rows and width in bytes */ - width = NXGL_SCALEX(dest->pt2.x - dest->pt1.x); - rows = dest->pt2.y - dest->pt1.y; + width = NXGL_SCALEX(dest->pt2.x - dest->pt1.x + 1); + rows = dest->pt2.y - dest->pt1.y + 1; #if NXGLIB_BITSPERPIXEL < 8 # ifdef CONFIG_NXGL_PACKEDMSFIRST |