From a7628ccaeaceffe9d6b1d59f24eefea8efdc5c41 Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Wed, 19 Jul 2023 11:43:10 +0300 Subject: [PATCH] Fix bufferDrawLine Missing 1 pixel in the middle of the vertical line. --- src/draw.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/draw.cc b/src/draw.cc index 674b0ac..721a95e 100644 --- a/src/draw.cc +++ b/src/draw.cc @@ -27,7 +27,7 @@ void bufferDrawLine(unsigned char* buf, int pitch, int x1, int y1, int x2, int y p1 = buf + pitch * y1 + x1; p2 = buf + pitch * y2 + x2; - while (p1 < p2) { + while (p1 <= p2) { *p1 = color; *p2 = color; p1 += pitch;