diff options
Diffstat (limited to 'nuttx/graphics/nxglib/nxglib_filltrapezoid.c')
-rw-r--r-- | nuttx/graphics/nxglib/nxglib_filltrapezoid.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nuttx/graphics/nxglib/nxglib_filltrapezoid.c b/nuttx/graphics/nxglib/nxglib_filltrapezoid.c index ff7eb492b..231671735 100644 --- a/nuttx/graphics/nxglib/nxglib_filltrapezoid.c +++ b/nuttx/graphics/nxglib/nxglib_filltrapezoid.c @@ -125,8 +125,8 @@ void NXGL_FUNCNAME(nxgl_filltrapezoid,NXGLIB_SUFFIX)( /* Calculate the slope of the left and right side of the trapezoid */ - dx1dy = b16divi((trap->bot.x1 - x1), nrows); - dx2dy = b16divi((trap->bot.x2 - x2), nrows); + dx1dy = b16divi((trap->bot.x1 - x1), nrows - 1); + dx2dy = b16divi((trap->bot.x2 - x2), nrows - 1); /* Perform vertical clipping */ |