Fix bufferDrawLine

Missing 1 pixel in the middle of the vertical line.
This commit is contained in:
Alexander Batalov 2023-07-19 11:43:10 +03:00
parent 3af2a49250
commit a7628ccaea

View File

@ -27,7 +27,7 @@ void bufferDrawLine(unsigned char* buf, int pitch, int x1, int y1, int x2, int y
p1 = buf + pitch * y1 + x1; p1 = buf + pitch * y1 + x1;
p2 = buf + pitch * y2 + x2; p2 = buf + pitch * y2 + x2;
while (p1 < p2) { while (p1 <= p2) {
*p1 = color; *p1 = color;
*p2 = color; *p2 = color;
p1 += pitch; p1 += pitch;