From 954b755923dfeb942dc54a85c66d2e11fddd3bbe Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 8 Sep 2018 22:01:17 +0100 Subject: [PATCH] plato: off by one errors in box etc --- Applications/plato/tgi_ascii.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Applications/plato/tgi_ascii.c b/Applications/plato/tgi_ascii.c index 3c233388..c2933c91 100644 --- a/Applications/plato/tgi_ascii.c +++ b/Applications/plato/tgi_ascii.c @@ -42,13 +42,13 @@ void tgi_setpixel(int x, int y) void tgi_bar(int x1, int y1, int x2, int y2) { int x,y; - for (y = y1; y < y2; y++) { + for (y = y1; y <= y2; y++) { printf("\033[%d;%dH", y, x1); if (pen) - for(x = x1; x < x2; x++) + for(x = x1; x <= x2; x++) putchar('#'); else - for(x = x1; x < x2; x++) + for(x = x1; x <= x2; x++) putchar(' '); } // printf("[R %d,%d,%d,%d->%d]", x1, y1, x2,y2, pen); -- 2.34.1